static-router
Express/Connect middleware to server static files based on glob-like routes.
Install
npm install static-router --save
Usage
var http = ;var connect = ;var router = ; var app = ; app; http;
Ensure order of routes
var http = ;var connect = ;var router = ; var app = ; app; http;
router(routes[, options])
routes
- object or array containing globs as keys and target static files and values. Use of an array ensures the order in which the routes are parsed.options
root
- the root directory of the static files.index
- name of the default directory index file. Defaults toindex.html
.
Run Tests
npm install
npm test