You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lloyd Brookes edited this page Jun 18, 2019
·
17 revisions
Please see the lws API docs. The local-web-server programmatic API is identical to lws, the only difference being that local-web-server has a default stack while lws does not.
Trival example:
constLocalWebServer=require('local-web-server')constws=LocalWebServer.create({port: 9000,directory: 'public'})/* make requests */// curl http://localhost:9000/* shut down */ws.server.close()