feat: use routes in app.ts
This commit is contained in:
parent
622c59df4d
commit
fda268a033
@ -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}`);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user