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.

72 lines
3.5 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. ## API Reference
  2. * [local-web-server](#module_local-web-server)
  3. * [LocalWebServer](#exp_module_local-web-server--LocalWebServer) ⇐ <code>module:middleware-stack</code>
  4. * [new LocalWebServer([options])](#new_module_local-web-server--LocalWebServer_new)
  5. * _instance_
  6. * [.features](#module_local-web-server--LocalWebServer.LocalWebServer+features) : <code>Array.&lt;Feature&gt;</code>
  7. * [.options](#module_local-web-server--LocalWebServer.LocalWebServer+options) : <code>object</code>
  8. * [.view](#module_local-web-server--LocalWebServer.LocalWebServer+view) : <code>View</code>
  9. * [.server](#module_local-web-server--LocalWebServer.LocalWebServer+server) : <code>Server</code>
  10. * [.getApplication()](#module_local-web-server--LocalWebServer+getApplication) ⇒ <code>function</code>
  11. * [.getServer()](#module_local-web-server--LocalWebServer+getServer) ⇒ <code>Server</code>
  12. * _inner_
  13. * [~loadStack()](#module_local-web-server--LocalWebServer..loadStack) ⇒ <code>object</code>
  14. <a name="exp_module_local-web-server--LocalWebServer"></a>
  15. ### LocalWebServer ⇐ <code>module:middleware-stack</code> ⏏
  16. **Kind**: Exported class
  17. **Extends:** <code>module:middleware-stack</code>
  18. <a name="new_module_local-web-server--LocalWebServer_new"></a>
  19. #### new LocalWebServer([options])
  20. **Params**
  21. - [options] <code>object</code> - Server options
  22. - .port} <code>number</code> - Port
  23. - .stack} <code>Array.&lt;string&gt;</code> | <code>Array.&lt;Features&gt;</code> - Port
  24. <a name="module_local-web-server--LocalWebServer.LocalWebServer+features"></a>
  25. #### localWebServer.features : <code>Array.&lt;Feature&gt;</code>
  26. Loaded feature modules
  27. **Kind**: instance property of <code>[LocalWebServer](#exp_module_local-web-server--LocalWebServer)</code>
  28. <a name="module_local-web-server--LocalWebServer.LocalWebServer+options"></a>
  29. #### localWebServer.options : <code>object</code>
  30. Config
  31. **Kind**: instance property of <code>[LocalWebServer](#exp_module_local-web-server--LocalWebServer)</code>
  32. <a name="module_local-web-server--LocalWebServer.LocalWebServer+view"></a>
  33. #### localWebServer.view : <code>View</code>
  34. Current view.
  35. **Kind**: instance property of <code>[LocalWebServer](#exp_module_local-web-server--LocalWebServer)</code>
  36. <a name="module_local-web-server--LocalWebServer.LocalWebServer+server"></a>
  37. #### localWebServer.server : <code>Server</code>
  38. Node.js server
  39. **Kind**: instance property of <code>[LocalWebServer](#exp_module_local-web-server--LocalWebServer)</code>
  40. <a name="module_local-web-server--LocalWebServer+getApplication"></a>
  41. #### localWebServer.getApplication() ⇒ <code>function</code>
  42. Returns a middleware application suitable for passing to `http.createServer`. The application is a function with three args (req, res and next) which can be created by express, Koa or hand-rolled.
  43. **Kind**: instance method of <code>[LocalWebServer](#exp_module_local-web-server--LocalWebServer)</code>
  44. <a name="module_local-web-server--LocalWebServer+getServer"></a>
  45. #### localWebServer.getServer() ⇒ <code>Server</code>
  46. Returns a listening server which processes requests using the middleware supplied.
  47. **Kind**: instance method of <code>[LocalWebServer](#exp_module_local-web-server--LocalWebServer)</code>
  48. <a name="module_local-web-server--LocalWebServer..loadStack"></a>
  49. #### LocalWebServer~loadStack() ⇒ <code>object</code>
  50. Loads a module by either path or name.
  51. **Kind**: inner method of <code>[LocalWebServer](#exp_module_local-web-server--LocalWebServer)</code>