event subscriptions

This commit is contained in:
toni
2026-03-15 15:39:45 +01:00
parent 29c6828dd1
commit 2620538a2c
26 changed files with 1028 additions and 214 deletions
+2 -14
View File
@@ -34,24 +34,12 @@ async function run() {
}),
);
app.use(sessionHandler);
app.use(await keycloakUser.middleware());
app.use(express.urlencoded({ extended: true }));
app.use(express.json());
// const dbService = inject(DatabaseService);
// app.use(async (req, res, next) => {
// await dbService.createTransaction(async prisma => {
// (req as any).transaction = prisma;
// return new Promise<void>((resolve, reject) => {
// res.on("finish", resolve);
// res.on("close", resolve);
// res.on("error", reject);
// next();
// });
// });
// });
RegisterRoutes(app);
const environment = inject(EnvironmentService);
@@ -74,6 +62,7 @@ async function run() {
let port: number;
if (isDev) {
//TODO start with HTTPS in dev
// cert = fs.readFileSync("src/cert.pem");
// key = fs.readFileSync("src/key.pem");
@@ -85,7 +74,6 @@ async function run() {
console.log(`Server is running at http://localhost:${port}`);
});
} else {
//TODO start with HTTPS in production
port = 5443;
const SSL_CERT_PATH = process.env["SSL_CERT_PATH"];
const SSL_KEY_PATH = process.env["SSL_KEY_PATH"];