diff --git a/nodemon.json b/nodemon.json index 4df56ed0c5d5d53f10b139aa6fcdfebe598dde8f..70a9d6673191f35cf37560a29c3d4b92ee5fe38d 100644 --- a/nodemon.json +++ b/nodemon.json @@ -2,5 +2,5 @@ "watch": ["src"], "ext": "ts", "ignore": ["src/public"], - "exec": "NODE_ENV=development ts-node src/index.ts" + "exec": "ts-node src/index.ts" } diff --git a/src/index.ts b/src/index.ts index e880caa51515ba7eca2a69fe1f83c570176280a9..6d84fb6058ad094cc870b2ac81981961f5bcc7a0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,6 +3,7 @@ import express, { Request, Response, NextFunction, Application } from "express"; import bodyParser from "body-parser"; import expressSession from "express-session"; import authRoute from './routes/auth'; +import newsRoute from './routes/news'; const app: Application = express(); @@ -25,6 +26,9 @@ app.get("/", (req: Request, res: Response) => { // Register routes authRoute(app); +// Register routes +newsRoute(app); + app.use((err: any, req: Request, res: Response, next: NextFunction) => { res.status(500).send("Houston, we have a problem!");