chore(backend): Setup MikroORM

Simpele configuratie, geen integratie
Succesvol commando's uitvoeren werkt
This commit is contained in:
Tibo De Peuter 2025-02-19 19:59:36 +01:00
parent 6d73120975
commit 2f280d3fb2
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
8 changed files with 1341 additions and 191 deletions

View file

@ -1,15 +1,21 @@
import express, {Express, Request, Response} from 'express';
import initORM from './orm'
const app: Express = express();
const port: string | number = process.env.PORT || 3000;
// TODO Replace with Express routes
app.get('/', (_, res: Response) => {
res.json({
message: 'Hello Dwengo!'
});
});
app.listen(port, () => {
async function startServer() {
const orm = await initORM();
app.listen(port, () => {
console.log(`Server is running at http://localhost:${port}`);
})
});
}
startServer();