todolist-backend
todolist-backend copied to clipboard
Update index.js
Refactor: Use process.env.PORT for dynamic port assignment
- Replaced the usage of resp with res for consistency
- Modified port assignment to use process.env.PORT || 3001 for flexibility in different environments
This change ensures that the server listens on the appropriate port based on the env(environment), allowing for smoother deployment in various hosting platforms like,for instance, Heroku