settle
Express/Connect middleware that serves local or remote static files.
Install
npm install settle --save
Usage
Serve static files
var express = ;var settle = ; var app = ; app; app;
Proxy remote files
var express = ;var settle = ; var app = ; app; app;
settle([options])
- options - the options are similar to the send module because it uses this to serve local static files. Here are a few:
root
- the root directory if serving local files or the url to prepend to requests to proxy remote static filesindex
- a string or array of strings that define the directory index filedotfiles
- how to handle files that begin with a dot. These are usually hidden files. The default value is ignore. Available options:allow
- No special treatment for dotfilesdeny
- Send a 403 for any request for a dotfileignore
- Pretend like the dotfile does not exist and 404
Run Tests
npm install
npm test