Betterzon/Backend/src/middleware/notFound.middleware.ts

13 lines
256 B
TypeScript

import { Request, Response, NextFunction } from "express";
export const notFoundHandler = (
request: Request,
response: Response,
next: NextFunction
) => {
const message = "Resource not found";
response.status(404).send(message);
};