feat: add the example to the app
This commit is contained in:
parent
b16d648fbd
commit
7f2b5b6964
@ -1,9 +1,12 @@
|
|||||||
import express from 'express';
|
import express from 'express';
|
||||||
const app = express();
|
import db from './db';
|
||||||
const port = 3000;
|
|
||||||
|
|
||||||
app.get('/', (req, res) => {
|
const app = express();
|
||||||
res.send('Hello World!');
|
const port = process.env.PORT ?? 3000;
|
||||||
|
|
||||||
|
app.get('/', async (_req, res) => {
|
||||||
|
const message = await db.example_request();
|
||||||
|
res.send(message);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.listen(port, () => {
|
app.listen(port, () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user