diff --git a/back-end/src/app.ts b/back-end/src/app.ts index 17c6482..060cfd4 100644 --- a/back-end/src/app.ts +++ b/back-end/src/app.ts @@ -8,6 +8,7 @@ import path from 'path'; import routes from './routes'; const app = express(); + const port = process.env.PORT ?? 3000; const log_format = (process.env.NODE_ENV === "dev") ? "dev": "combined"; @@ -22,6 +23,9 @@ app.set('view engine', 'ejs'); // Add logs app.use(morgan(log_format)); +// Defines endpoints +app.use(routes); + app.listen(port, () => { return console.log(`Briques is listening at http://localhost:${port}`); });