Switched to export default exports

ref #4
This commit is contained in:
Nicolai Ort 2020-11-25 18:15:54 +01:00
parent 23df478522
commit e58da2a22b
2 changed files with 4 additions and 0 deletions

View File

@ -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';

View File

@ -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;