Skip to content
Snippets Groups Projects
Commit d0eceeeb authored by chif's avatar chif Committed by Chif Gergő
Browse files

Initialize routes

parent ed42c9f8
No related branches found
No related tags found
Loading
......@@ -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"
}
......@@ -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!");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment