I am working on an existing project and found this piece of code in my app.js
//if (!module.parent) {
// Server listen
app.listen(mysettings.port, function () {
console.log(`Server ready at ${ENV}:${mysettings.port}`);
});
//}
When I run locally, app.listen hits and my project runs, when I upload my project on a ubuntu server, the project does not run, but times out. When I comment out the condition on ubuntu the project runs perfectly. I know on my localhost, module.parent is null.
Any help would be apperciated.