Skip to content
Lloyd Brookes edited this page Jun 12, 2019 · 100 revisions

Feel free to edit this wiki. If something is missing or not clear, please raise a ticket.

The Basics

Local-web-server is a distribution of lws bundled with a "starter pack" of useful middleware.

Default stack tutorials

Name Description
Basic Auth How to password-protect a server using Basic Authentication.
Body Parser How to access the body of an incoming request
Request Monitor Feeds traffic information to the --verbose output.
Log How to output an access log
How to visualise access logs with third-party tools
Cors How to configure Cross-Origin Resource Sharing (CORS)
Json Pretty-prints JSON responses.
Rewrite How to rewrite URLs to local or remote destinations
Blacklist How to blacklist certain routes
Conditional Get How to use HTTP Conditional Requests
Mime How to customise mime types
Compress Compress responses using gzip.
SPA How to serve a Single Page Application (SPA)
Static How to serve static files
Index Serves directory listings.

Other middleware plugins

Name Description
Redirect Perform a 302 Redirect if the requested URL matches a specified regular expression.

Extending

Plugins

Clone this wiki locally