style: Format boilerplate
This commit is contained in:
parent
9b52b43f65
commit
788e1642d1
26 changed files with 686 additions and 564 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue