tofumatt/nconfs — pull request #1 by gwhitelaw (2012-11-04 22:10:05+00:00)
Title: Use the absolute app path when loading default config files

This should allow the server to run when called from anywhere.

When I run my server from outside the server's root folder (usually on my build server), the configuration files do not load.

To recreate, simply run the app.js file from outside root folder on this project.

Eg:
[~/]$ node nconfs/app.js
Not loading: defaults.json (file doesn't exist?)
Not loading: defaults-development.json (file doesn't exist?)
Not loading: local.json (file doesn't exist?)

However, when fixing the reference to appPath it works:

[~/]$ node nconfs/app.js
Loading /home/ghow/codebase/other/nconfs/defaults.json
Not loading: defaults-development.json (file doesn't exist?)
Not loading: local.json (file doesn't exist?)