I've got an MVC application using Nodejs / Express.
If I start the app using PM2 within the directory EG.
pm2 start my_app.js
All is well. If I try to start it from another directory EG.
pm2 start ../another_directory/my_app.js
The app appears to start fine, but when I browser the app it complains it can't find the view file. The error implies it's looking for the view file in the directory (EG my_folder/views I'm sat in, instead of ./another_directory/views/my_view.
Sorry this is a bit general. But does this ring a bell with anybody please?
Thanks.
Edit. Would setting a Express namespace solve this issue as per:
Edit 2. It didn't help.