20 lines
505 B
TypeScript
20 lines
505 B
TypeScript
import express from "express";
|
|
import { RegisterRoutes } from "./generated/routes.js";
|
|
import { sessionHandler } from "./infrastructure/session.js";
|
|
import { keycloak } from "./services/keycloak/user/index.js";
|
|
|
|
const app = express();
|
|
const port = 3000;
|
|
|
|
app.use(sessionHandler);
|
|
app.use(keycloak.middleware());
|
|
|
|
app.use(express.urlencoded({ extended: true }));
|
|
app.use(express.json());
|
|
|
|
RegisterRoutes(app);
|
|
|
|
app.listen(port, () => {
|
|
console.log(`Server is running at http://localhost:${port}`);
|
|
});
|