Set environment based on environment variable

11 views
Skip to first unread message

Mehul Kar

unread,
Sep 30, 2014, 4:16:09 PM9/30/14
to ged...@googlegroups.com
I can't tell from the docs/guides, but I'm looking for a way to set an environment variable on my system and Geddy defaults to that environment (instead of having to pass it in as a CLI arg).

Is this possible? E.g. Rails uses `RAILS_ENV`. 

Mehul Kar

unread,
Sep 30, 2014, 4:27:02 PM9/30/14
to ged...@googlegroups.com
I see `GEDDY_ENVIRONMENT` in https://github.com/geddy/geddy/wiki/Debugging, but not sure how I can get `node_modules/geddy/bin/cli.js` to default to that. Do I need to write my own wrapper script? 

Matthew Eernisse

unread,
Oct 31, 2014, 4:51:58 PM10/31/14
to ged...@googlegroups.com
Sorry, the wiki info is totally outdated.

Geddy's startup will look for a command-line flag, then the standard NODE_ENV, before falling back to the base config:

https://github.com/geddy/geddy/blob/master/lib/config.js#L30
Reply all
Reply to author
Forward
0 new messages