logger common test
This commit is contained in:
11
bin/ws.js
11
bin/ws.js
@ -1,8 +1,17 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict'
|
||||
const localWebServer = require('../')
|
||||
const streamLogStats = require('stream-log-stats')
|
||||
|
||||
localWebServer()
|
||||
const options = {
|
||||
static: { root: '.' },
|
||||
serveIndex: { path: '.' },
|
||||
logger: { format: 'common', options: {
|
||||
stream: streamLogStats({ refreshRate: 100 })}
|
||||
}
|
||||
}
|
||||
|
||||
localWebServer(options)
|
||||
.listen(8000, () => {
|
||||
console.log(`listening`)
|
||||
})
|
||||
|
Reference in New Issue
Block a user