# not-found

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

Latest version **1.0.1** (published 2014-09-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install not-found
pnpm add not-found
yarn add not-found
bun add not-found
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2014-09-17 |
| First published | 2014-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Divshot |
| Maintainers | scottcorgan |
| Keywords | divshot, superstatic, notfound, 404, error |

## Links

- npm: https://www.npmjs.com/package/not-found
- Repository: https://github.com/divshot/not-found
- Issues: https://github.com/divshot/not-found/issues
- npm.io page: https://npm.io/package/not-found

## Dependencies (3)

- [is-url](https://npm.io/package/is-url.md) ^1.1.0
- [deliver](https://npm.io/package/deliver.md) ^1.1.0
- [file-exists](https://npm.io/package/file-exists.md) ^0.1.1

## Recent versions

- 1.0.1 (latest) — 2014-09-17
- 0.3.1-rc8 (0.3.1-rc8) — 2014-09-10
- 0.3.1-rc7 (0.3.1-rc7) — 2014-09-10
- 0.3.1-rc6 (0.3.1-rc6) — 2014-09-10
- 0.3.1-rc5 (0.3.1-rc5) — 2014-09-10
- 0.3.1-rc4 (0.3.1-rc4) — 2014-09-10
- 0.3.1-rc3 (0.3.1-rc3) — 2014-09-10
- 0.3.1-rc2 (0.3.1-rc2) — 2014-09-10
- 0.3.1-rc1 (0.3.1-rc1) — 2014-09-10
- 1.0.0 — 2014-09-11
- 0.3.2 — 2014-09-11
- 0.3.1 — 2014-09-10
- 0.3.0 — 2014-08-29
- 0.2.3 — 2014-08-01
- 0.2.1 — 2014-07-30
- … 2 more at https://npm.io/package/not-found/versions

## README

# not-found

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

## Install

```
npm install not-found --save
```

## Usage

Local file

```js
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

```js
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
```

---
_Source: https://npm.io/package/not-found · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
