Initial Commit

This commit is contained in:
seedorf_s1
2020-11-13 09:09:21 +01:00
commit 5a56fc26d2
50 changed files with 5038 additions and 0 deletions

20
src/routes/index.ts Normal file
View File

@@ -0,0 +1,20 @@
import * as express from 'express';
import userRouter from './api/user';
import healthRouter from './healthcheck';
import {Config} from '../utils';
const router = express.Router();
export default router;
router.use("/api/user", userRouter);
router.use("/health", healthRouter);
/* GET home page. */
router.get('/', async (req, res) => {
const email = (await req.getUserInfo())?.email ?? "No email found!";
res.render('index', {title: 'Express', email, externalUrl: Config.EXTERNAL_BASE_URL});
});
router.get('/logout', (req, res) => {
res.initLogout();
});