From e58da2a22b98dc63d0982a5dad4fb94653038f2e Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Wed, 25 Nov 2020 18:15:54 +0100 Subject: [PATCH] Switched to export default exports ref #4 --- src/app.ts | 1 + src/routes/index.ts | 3 +++ 2 files changed, 4 insertions(+) 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;