Closed applmak closed 9 years ago
Try using a direct path in your NODE_CONFIG_DIR vs. a relative path. That's likely to solve the problem of going to the wrong directory.
$PROJECT/config/default.js:
module.exports = { ... // Dashboard application configurations Dashboard: { // The port to listen on for application traffic port:4201, ... };
Now I execute: $ cd $PROJECT/node_modules/monitor-dashboard && NODE_CONFIG_DIR=$PROJECT/config node monitor.js
I see:
Now showing at http://localhost:4200/
What am I doing wrong?
On Fri, Aug 28, 2015 at 12:57 PM, Loren West notifications@github.com wrote:
Try using a direct path in your NODE_CONFIG_DIR vs. a relative path. That's likely to solve the problem of going to the wrong directory.
— Reply to this email directly or view it on GitHub https://github.com/lorenwest/monitor-dashboard/issues/31#issuecomment-135846571 .
I figured this out:
1) The default.js that is checked-in has skewed from the actual Backbone Model defaults. Now, port and sitedbpath are under Monitor.
2) Adding monitor-dashboard to my package.json caused the dashboard to attempt to load my server, which failed due to lack of the correct configuration. I'll need to figure out a different way to manage this dep, I suppose.
I'd like to use this library, but I'm stymied as to how to change the config file location. I've tried:
NODE_CONFIG_DIR=../../config node monitor.js
where I've placed a new default.js, but the monitoring app still reads from ./config/. How do I change the config file location?