Simple local development server
A simple development server geared towards front-end developers and ADD (Api Driven Development) applications.
For ADD applications front-end developers generally have no need for a full stack development environment, so a lot of front-end developers use a combination of a local http instance for static content, and a http proxy that forwards to the back-end.
node-devserver combines these two into one.
When a request comes in node-devserver will first try to serve the request from the local filesystem, and if unsuccessfull proxy the request to a remote server. For example: let's say we get make a request to
http://some.domain.local/a/file.ext (asuming that
some.domain.local is pointing to our local machine) - node-devserver will try to serve the file from these locations (in order)
If none of these work the request will be proxied to a remote server.
The node-devserver configuration file is basically an array of middlewares to load (in order). And example configuraton file could look like this:
frontend middleware is responsible for serving local files.
The configuration is quite straight forward -
arguments is an array of strings that point out the location(s) where static files are served from.
backend middleware matches url's to remote servers.
Options are tried in order like this:
regexpand store capture