Add about me

This commit is contained in:
xfarrow
2024-03-04 15:15:09 +01:00
parent 08623759cb
commit 3b5114dee0
6 changed files with 35 additions and 32 deletions

View File

@ -78,12 +78,16 @@ app.use('/api', protectedRoutes); // Routes requiring token
===== END ROUTE HANDLING =====
*/
// 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}`);
});
// Do not start the server in testing environment
// It will be started by the test suite
if (process.argv[2] != 'testing') {
// 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}`);
});
}
// Export the app for testing purposes
module.exports = app;