You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

41 lines
836 B

'use strict'
const Lws = require('lws')
/**
* @module local-web-server
*/
/**
* @alias module:local-web-server
*/
class LocalWebServer extends Lws {
constructor () {
const path = require('path')
const 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'
].map(name => {
return path.resolve(__dirname, `../node_modules/${name}`)
})
super({ stack, 'config-name': 'local-web-server' })
}
getVersion () {
const path = require('path')
const pkg = require(path.resolve(__dirname, '..', 'package.json'))
return pkg.version
}
}
module.exports = LocalWebServer