api keycloak setup
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
import express from 'express';
|
||||
import { RegisterRoutes } from './generated/routes.js';
|
||||
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}`);
|
||||
console.log(`Server is running at http://localhost:${port}`);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user