diff --git a/src/app.ts b/src/app.ts deleted file mode 100644 index e716c15..0000000 --- a/src/app.ts +++ /dev/null @@ -1,13 +0,0 @@ -import express from 'express'; -import bodyParser from 'body-parser'; -import { setupApis } from './api'; - -const app = express(); - -app.set('port', process.env.PORT || 3000); -app.use(bodyParser.json()); -app.use(bodyParser.urlencoded({ extended: true })); - -setupApis(app); - -export default app; diff --git a/src/index.ts b/src/index.ts index a8bee26..6008e36 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,14 @@ -import app from './app'; +import express from 'express'; +import bodyParser from 'body-parser'; +import { setupApis } from './api'; + +const app = express(); + +app.set('port', process.env.PORT || 3000); +app.use(bodyParser.json()); +app.use(bodyParser.urlencoded({ extended: true })); + +setupApis(app); const server = app.listen(app.get('port'), () => { console.log(