feat: add the example to the app
This commit is contained in:
parent
b16d648fbd
commit
7f2b5b6964
@ -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, () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user