fix: Voorbereiding production

This commit is contained in:
Tibo De Peuter 2025-03-13 14:27:12 +01:00
parent 6a6eed8978
commit fc5ba93ba0
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
13 changed files with 293 additions and 257 deletions

View file

@ -30,29 +30,29 @@ app.use(responseTime(responseTimeLogger));
app.use(authenticateUser);
// TODO Replace with Express routes
app.get('/', (_, res: Response) => {
logger.debug('GET /');
app.get('/api/', (_, res: Response) => {
logger.debug('GET /api/');
res.json({
message: 'Hello Dwengo!🚀',
});
});
app.use('/student', studentRouter);
app.use('/group', groupRouter);
app.use('/assignment', assignmentRouter);
app.use('/submission', submissionRouter);
app.use('/class', classRouter);
app.use('/question', questionRouter);
app.use('/auth', authRouter);
app.use('/theme', themeRoutes);
app.use('/learningPath', learningPathRoutes);
app.use('/learningObject', learningObjectRoutes);
app.use('/api/student', studentRouter);
app.use('/api/group', groupRouter);
app.use('/api/assignment', assignmentRouter);
app.use('/api/submission', submissionRouter);
app.use('/api/class', classRouter);
app.use('/api/question', questionRouter);
app.use('/api/auth', authRouter);
app.use('/api/theme', themeRoutes);
app.use('/api/learningPath', learningPathRoutes);
app.use('/api/learningObject', learningObjectRoutes);
async function startServer() {
await initORM();
app.listen(port, () => {
logger.info(`Server is running at http://localhost:${port}`);
logger.info(`Server is running at http://localhost:${port}/api`);
});
}