Merge branch 'dev' into feat/leerpad-object-routes
This commit is contained in:
commit
0c7f5791ea
103 changed files with 3760 additions and 12087 deletions
|
@ -1,11 +1,22 @@
|
|||
import express, { Express, Response } from 'express';
|
||||
import initORM from './orm.js';
|
||||
import { initORM } from './orm.js';
|
||||
import { EnvVars, getNumericEnvVar } from './util/envvars.js';
|
||||
|
||||
import themeRoutes from './routes/themes.js';
|
||||
import learningPathRoutes from './routes/learningPaths.js';
|
||||
import learningObjectRoutes from './routes/learningObjects.js';
|
||||
|
||||
import studentRouter from './routes/student';
|
||||
import groupRouter from './routes/group';
|
||||
import assignmentRouter from './routes/assignment';
|
||||
import submissionRouter from './routes/submission';
|
||||
import classRouter from './routes/class';
|
||||
import questionRouter from './routes/question';
|
||||
import loginRouter from './routes/login';
|
||||
|
||||
const app: Express = express();
|
||||
const port: string | number = process.env.PORT || 3000;
|
||||
const port: string | number = getNumericEnvVar(EnvVars.Port);
|
||||
|
||||
|
||||
// TODO Replace with Express routes
|
||||
app.get('/', (_, res: Response) => {
|
||||
|
@ -14,6 +25,14 @@ app.get('/', (_, res: Response) => {
|
|||
});
|
||||
});
|
||||
|
||||
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('/login', loginRouter);
|
||||
|
||||
app.use('/theme', themeRoutes);
|
||||
app.use('/learningPath', learningPathRoutes);
|
||||
app.use('/learningObject', learningObjectRoutes);
|
||||
|
@ -26,4 +45,4 @@ async function startServer() {
|
|||
});
|
||||
}
|
||||
|
||||
startServer();
|
||||
await startServer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue