UNPKG

@mark01/express-utils

Version:

npm package that contains utilities for express.js

6 lines (5 loc) 196 B
import { AppError } from '../error'; export const notFound = () => (req, _, next) => { next(new AppError(`Cannot find '${req.originalUrl}' on this server!`, 404)); }; export default notFound;