main lib, fix tests

This commit is contained in:
Lloyd Brookes
2017-06-12 00:18:32 +01:00
parent d07ef41cd2
commit 7dccc470df
4 changed files with 48 additions and 69 deletions

View File

@ -0,0 +1,29 @@
const Lws = require('lws')
const path = require('path')
class LocalWebServer extends Lws {
constructor (options) {
options = Object.assign({
moduleDir: path.resolve(__dirname, `../../node_modules`),
modulePrefix: 'lws-',
stack: [
'lws-log',
'lws-cors',
'lws-json',
'lws-rewrite',
'lws-body-parser',
'lws-blacklist',
'lws-conditional-get',
'lws-mime',
'lws-compress',
'lws-mock-response',
'lws-spa',
'lws-static',
'lws-index'
]
}, options)
super(options)
}
}
module.exports = LocalWebServer