Closed smithcommajoseph closed 11 years ago
This is awesome, thank you. It would be very good for us not to reinvent the wheel. Ill take a look at this in detail tomorrow.
On Saturday, July 27, 2013, Joseph Smith wrote:
I took the liberty of implementing this in the rendr-clihttps://github.com/technicolorenvy/rendr-cliand think it is a nice addition to the rendr-app-template project.
By using the node-config module, we can easily define a default config from which all other environment-specific configs can inherit from. While this PR is using yaml for the conf files, it is easy enough to swap out w/ .js or .json files, i chose yaml as it feels like a good sensible default.
Additionally, we are able to remove this file form the boiler-plate setup
server/envhttps://github.com/airbnb/rendr-app-template/blob/master/server/lib/env.js
You can merge this Pull Request by running
git pull https://github.com/technicolorenvy/rendr-app-template node-config
Or view, comment on, or merge it at:
https://github.com/airbnb/rendr-app-template/pull/42 Commit Summary
- use node-config module
File Changes
- A config/default.ymlhttps://github.com/airbnb/rendr-app-template/pull/42/files#diff-0(23)
- D config/development.jshttps://github.com/airbnb/rendr-app-template/pull/42/files#diff-1(27)
- A config/development.ymlhttps://github.com/airbnb/rendr-app-template/pull/42/files#diff-2(1)
- D config/production.jshttps://github.com/airbnb/rendr-app-template/pull/42/files#diff-3(27)
- A config/production.ymlhttps://github.com/airbnb/rendr-app-template/pull/42/files#diff-4(1)
- M index.jshttps://github.com/airbnb/rendr-app-template/pull/42/files#diff-5(18)
- M package.jsonhttps://github.com/airbnb/rendr-app-template/pull/42/files#diff-6(4)
- D server/lib/env.jshttps://github.com/airbnb/rendr-app-template/pull/42/files#diff-7(9)
Patch Links:
Spike Brehm Software Engineer www.airbnb.com
San Francisco, CA, USA C: (602) 828-2358 See how Airbnb works https://www.airbnb.com/info/how_it_works
Can you also add config/runtime.json
to .gitignore
?
:beers:
I took the liberty of implementing this in the rendr-cli and think it is a nice addition to the rendr-app-template project.
By using the node-config module, we can easily define a default config from which all other environment-specific configs can inherit. While this PR is using yaml for the conf files, it is easy enough to swap out w/ .js or .json files, i chose yaml as it feels like a good sensible default.
Additionally, we are able to remove this file form the boiler-plate setup server/env