diff --git a/src/app.ts b/src/app.ts index 768ac51..9c53603 100644 --- a/src/app.ts +++ b/src/app.ts @@ -5,6 +5,7 @@ import * as jwt from 'jsonwebtoken'; import { createConnection } from 'typeorm'; import 'reflect-metadata'; import { router as routerMain } from './routes/index'; +import routerMain from './routes/index'; // const loaders = require('./loaders'); import * as loaders from './loaders/index'; diff --git a/src/routes/index.ts b/src/routes/index.ts index 1dc658e..fd06236 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -3,7 +3,10 @@ const router = express.Router(); router.use('/v1/', (req, res) => { return res.send('Express + TypeScript Server'); }); +import Router from 'express'; +import v1 from "./v1/index"; router.use('*', (req, res) => { return res.status(404).send('404'); }); export { router }; +export default router;