http-server-request-handlers-not-found
v0.1.1
Published
an http.Server request handler that handles a situation where no request handler processed the IncomingMessage
Downloads
1
Maintainers
Readme
http-server-request-handlers-not-found
an http.Server request handler that handles a situation where no request handler processed the IncomingMessage
table of contents
notes
- expects
next()
to be a callable function that accepts an Error as its first parameter
installation
npm install http-server-request-handlers-not-found
api
/**
* @param {IncomingMessage} req
* @param {ServerResponse} res
* @param {Function} next
*
* @returns {undefined}
*/
function notFoundRequestHandler( req, res, next )
usage
basic
var express = require( 'express' )
var app = express()
// add as the next to last middelware handler, just before completing the IncomingRequest
// e.g., just before http-server-request-handlers-error-logger
app.use( require( 'http-server-request-handlers-not-found' ) )