1.0.5 • Published 5 years ago

express-send-status v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Express Send Status

Express middleware for responding with a status code and optional message.

Install

$ npm install --save express-send-status

Usage

import * as express from 'express';
import sendStatus from 'express-send-status';

const app = express ();

app.use ( '/images', express.static ( path.join ( __dirname, 'images' ) ), sendStatus ( 404 ) );
app.use ( '/fonts', express.static ( path.join ( __dirname, 'fonts' ) ), sendStatus ( 404, 'Font not found.' ) );

app.get ( '*', ( req, res ) => {/*...*/} ); // Potentially expensive middleware that won't be called

License

MIT © Fabio Spampinato

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

7 years ago