not-found
Express/Connect middleware to serve a default not found/404 page
Last updated 12 years ago by scottcorgan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install not-found 
SYNC missed versions from official npm registry.

not-found

Express/Connect middleware to serve a default not found/404 page.

Install

npm install not-found --save

Usage

Local file

var express = require('express');
var notFound = require('not-found');

var app = express();

app.use(notFound(__dirname + '/not-found.html'));

app.listen(3000, function () {

});

Remote file

var express = require('express');
var notFound = require('not-found');

var app = express();

app.use(notFound('http://domain.com/not-found.html'));

app.listen(3000, function () {

});

notFound(file)

  • file - the path to the local file or a url for a remote file. This is required. It will skip the middleware if it is not provided or the file does not exists

Run Tests

npm install
npm test

Current Tags

  • 0.3.1-rc1                                ...           0.3.1-rc1 (12 years ago)
  • 0.3.1-rc2                                ...           0.3.1-rc2 (12 years ago)
  • 0.3.1-rc3                                ...           0.3.1-rc3 (12 years ago)
  • 0.3.1-rc4                                ...           0.3.1-rc4 (12 years ago)
  • 0.3.1-rc5                                ...           0.3.1-rc5 (12 years ago)
  • 0.3.1-rc6                                ...           0.3.1-rc6 (12 years ago)
  • 0.3.1-rc7                                ...           0.3.1-rc7 (12 years ago)
  • 0.3.1-rc8                                ...           0.3.1-rc8 (12 years ago)
  • 1.0.1                                ...           latest (12 years ago)

17 Versions

  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
  • 0.3.2                                ...           12 years ago
  • 0.3.1                                ...           12 years ago
  • 0.3.1-rc8                                ...           12 years ago
  • 0.3.1-rc7                                ...           12 years ago
  • 0.3.1-rc6                                ...           12 years ago
  • 0.3.1-rc5                                ...           12 years ago
  • 0.3.1-rc4                                ...           12 years ago
  • 0.3.1-rc3                                ...           12 years ago
  • 0.3.1-rc2                                ...           12 years ago
  • 0.3.1-rc1                                ...           12 years ago
  • 0.3.0                                ...           12 years ago
  • 0.2.3                                ...           12 years ago
  • 0.2.1                                ...           12 years ago
  • 0.2.0                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
Maintainers (1)
Downloads
Total 43
Today 0
This Week 16
This Month 43
Last Day 0
Last Week 27
Last Month 0
Dependencies (3)
Dev Dependencies (7)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE