ff-admin-server/src/index.ts

24 lines
466 B
TypeScript
Raw Normal View History

import "dotenv/config";
import express from "express";
declare global {
namespace Express {
export interface Request {
userId: string;
username: string;
rights: Array<string>;
}
}
}
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}`);
});