You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iassure-wx/backend/src/router.ts

15 lines
355 B

import { Request, Response, Router } from 'express';
import fooController from './controllers/foo.controller';
const router = Router();
router.get('/foo', fooController.getFoo);
// aaaaa
router.use((req: Request, res: Response) => {
// 404
res.status(404).json({ msg: 'the requested resource could not be found' });
});
export default { router };