neuron-dev-server
neuron-dev-server is a static file server and reverse proxy.
Install
$ npm install neuron-dev-server --save
Usage
For example, in conjunction with Express
var middleware = ; var options = routers: // defines it as default default: true // If the `req.url` matches `location` location: '/mod' // Then we will search the static file from root: '/path/to/mod' // If not found, then bypass to: by_pass: 'http://domain.com/mod' // If by_pass not specified, then `next()` will be called location: '/static' root: '/path/to/static' ... // All requests will be fallback to: by_pass: 'http://domain.com'; var app = ; app // Use neuron-dev-server middleware for express ;
middleware.options(options)
Static method to clean the options
.
License
MIT