import "dotenv/config"; import express from "express"; declare global { namespace Express { export interface Request { userId: string; username: string; rights: Array; } } } import { dataSource } from "./data-source"; dataSource.initialize(); const app = express(); import router from "./routes/index"; router(app); app.listen(process.env.SERVER_PORT, () => { console.log(`listening on *:${process.env.SERVER_PORT}`); });