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.

29 lines
636 B

  1. const Lws = require('lws')
  2. const path = require('path')
  3. class LocalWebServer extends Lws {
  4. constructor (options) {
  5. options = Object.assign({
  6. moduleDir: path.resolve(__dirname, `../../node_modules`),
  7. modulePrefix: 'lws-',
  8. stack: [
  9. 'lws-log',
  10. 'lws-cors',
  11. 'lws-json',
  12. 'lws-rewrite',
  13. 'lws-body-parser',
  14. 'lws-blacklist',
  15. 'lws-conditional-get',
  16. 'lws-mime',
  17. 'lws-compress',
  18. 'lws-mock-response',
  19. 'lws-spa',
  20. 'lws-static',
  21. 'lws-index'
  22. ]
  23. }, options)
  24. super(options)
  25. }
  26. }
  27. module.exports = LocalWebServer