Config split in files #50

Closed
wants to merge 7 commits into
from

Projects

None yet

4 participants

@gabrielmancini

better to mantain the config that way.

please evaluate ;-)

@roieki
Contributor
roieki commented Sep 7, 2013

Great commit. I'm going over it. Thanks!

@amoshaviv
Contributor

wow @gabrielmancini that is a great pull request me and @roieki are going over it, and should merge it soon...

@gabrielmancini

👍

@roieki roieki added a commit that referenced this pull request Sep 10, 2013
@roieki roieki Merge from gabrielmanchini - issue #50 014d941
@roieki
Contributor
roieki commented Sep 10, 2013

Merged - with a little change. For some reason loading with lib/config didn't work out, but the rest is there.

@roieki roieki closed this Sep 10, 2013
@gabrielmancini

@roieki

have u try set NODE_PATH=lib ?

why take off my authorship?

@dylntrnr

With these changes, what's the correct way to link to my mongolab db?

For example, before these changes my config/config.js file looked like

production: {
        db: process.env.MONGOLAB_URI,

But with the new setup, in config/env/production.json I am having to link to my db directly with something like:

{
    "db": "mongodb://nodejitsu_username:........ etc

Also in the new setup in config/env/all.js I put

    db : process.env.MONGOLAB_URI

But I am unsure how to link to that in config/env/production.json . Any suggestions?

Thank you

@gabrielmancini

hi @dylntrnr

My suggestions is,

set all env variables in all.js

and in production.json you strip the properties.

because all.js is a default and the files (develop.json, test.json...) extends all.js properties.

what u think?

@dylntrnr

Hi @gabrielmancini

That worked perfectly. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment