ts-express-kit
Version:
A TypeScript starter kit for building Express applications with best practices.
13 lines (11 loc) • 398 B
text/typescript
import { NextFunction, Request, Response } from 'express';
import httpStatus from 'http-status';
// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
const notFound = (req: Request, res: Response, next: NextFunction) => {
res.status(httpStatus.NOT_FOUND).json({
success: false,
message: 'API route not found',
error: ''
});
};
export default notFound;