event subscriptions
This commit is contained in:
@@ -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"];
|
||||
|
||||
Reference in New Issue
Block a user