static-nocase

0.0.3 • Public • Published

static-nocase

NPM Version NPM Downloads

Install

$ npm install statc-nocase

API

var static = require('static-nocase')

static(root, options)

Create a new middleware function to serve files from within a given root directory. The file to serve will be determined by combining req.url with the provided root directory. When a file is not found, instead of sending a 404 response, this module will instead call next() to move on to the next middleware, allowing for stacking and fall-backs.

Examples

Serving using express

var app = require('express')(),
    static = require('./static-nocase')
 
app.use(static(__dirname + '/static'))
 
// Listen
server.listen(3000)

License

MIT

Package Sidebar

Install

npm i static-nocase

Weekly Downloads

2

Version

0.0.3

License

MIT

Last publish

Collaborators

  • nicomua