If I go to mydir/core and enter
/usr/bin/node app.js &
my application starts fine. But if I go to mydir and enter
/usr/bin/node core/app.js &
I get errors.
core/user/dbConfig.js:6
var sequelize = new Sequelize(config.connections.postgres.database, config.con
^
TypeError: Cannot read property 'postgres' of undefined
at Object.<anonymous> (/home/dwil/code15/git_code/YB/root/services/core/user/dbConfig.js:6:49)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/home/dwil/code15/git_code/YB/root/services/core/app.js:12:10)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
sudo npm install -g sequelize doesn't solve it.
How do I install / configure so that I can start from a different directory? This matters b/c I'm trying to start it via Monit. That's why "just change into the right directory" is not a viable answer. Thanks!