Simple question:
In regards to Express's generator, what is the purpose and benefit behind abstracting app.listen()
out of the app.js file and into the ./bin/www
file ?
Simple question:
In regards to Express's generator, what is the purpose and benefit behind abstracting app.listen()
out of the app.js file and into the ./bin/www
file ?
This makes the app easily testable with supertest, for one thing. This way you can leave your dev server running and still run tests without worrying about TCP port conflicts.