style: Format boilerplate

This commit is contained in:
Tibo De Peuter 2025-02-20 14:18:32 +01:00
parent 9b52b43f65
commit 788e1642d1
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
26 changed files with 686 additions and 564 deletions

View file

@ -1,21 +1,22 @@
import express, {Express, Request, Response} from 'express';
import initORM from './orm'
import express, { Express, Response } from 'express';
import initORM from './orm.js';
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!'
});
res.json({
message: 'Hello Dwengo!',
});
});
async function startServer() {
const orm = await initORM();
app.listen(port, () => {
console.log(`Server is running at http://localhost:${port}`);
});
await initORM();
app.listen(port, () => {
console.log(`Server is running at http://localhost:${port}`);
});
}
startServer();