some comments, api port defaults to 3000

This commit is contained in:
Alessandro Ferro
2024-02-20 16:20:09 +01:00
parent ac8332c69a
commit b5c6bfded3
6 changed files with 57 additions and 6 deletions

View File

@ -53,7 +53,8 @@ protectedRoutes.delete('/organization/post/:id', apiController.deleteOrganizatio
app.use('/api', publicRoutes); // Routes not requiring token
app.use('/api', protectedRoutes); // Routes requiring token
// Start the server
app.listen(process.env.API_SERVER_PORT, () => {
console.log(`Blink API server is running on port ${process.env.API_SERVER_PORT}`);
// Start the server. Default port is 3000
const port = process.env.API_SERVER_PORT || 3000;
app.listen(port, () => {
console.log(`Blink API server is running on port ${port}`);
});