w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Node.js modules not accessible after ssh connection closed

I think you need to explicitly specify app.set('views', __dirname + '/views') in your app to avoid the express default which uses process.cwd(). That and maybe something weird is happening with PM2 changing the process's current working directory or something odd. This is probably less about your code and more about your server environment, so tough to troubleshoot remotely. You might try using upstart instead of PM2.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.