split express app from index file to make testing easier
This commit is contained in:
15
backend/src/server.ts
Normal file
15
backend/src/server.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import express from "express";
|
||||
import dotenv from "dotenv";
|
||||
import * as bodyParser from 'body-parser';
|
||||
|
||||
import * as routes from "./routes"
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const app = express();
|
||||
app.use(bodyParser.json());
|
||||
|
||||
// Configure routes
|
||||
routes.register(app);
|
||||
|
||||
export default app;
|
||||
Reference in New Issue
Block a user