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