feat: add the example to the app

This commit is contained in:
Nemo D'ACREMONT 2024-10-25 11:04:58 +02:00
parent b16d648fbd
commit 7f2b5b6964
No known key found for this signature in database
GPG Key ID: 6E5BCE8022FA8276

View File

@ -1,9 +1,12 @@
import express from 'express';
const app = express();
const port = 3000;
import db from './db';
app.get('/', (req, res) => {
res.send('Hello World!');
const app = express();
const port = process.env.PORT ?? 3000;
app.get('/', async (_req, res) => {
const message = await db.example_request();
res.send(message);
});
app.listen(port, () => {