Allow config.json location to be configured by argument to app.js #146

Merged
merged 1 commit into from Mar 25, 2014

Projects

None yet

2 participants

@rowanhill

Hi,

Following on from #137, this change allows the location (and name) of config.json to be configured via a command line argument to app.js. This allows I/O Docs to be run without any modifications within the repository.

The downside is that npm start can't be run with arguments (they don't get passed through to the specified script), until issue 3494 in npm is resolved. Instead, supervisor (or node) has to be run manually.

I know that's not ideal, but I think this is a big enough win to justify the pain (until the npm issue is resolved).

Thanks,
Rowan

@mtougeron mtougeron was assigned Dec 16, 2013
@mtougeron

The code looks good but I'm curious why a simple symlink of the config.json won't work for this? It "feels" kind of hacky to me.

@rowanhill

My thinking was:
a) It feels bit cleaner to me to be able to run I/O Docs without having to put anything in the repository
b) Symlinks are a bit of a pain in Windows (this is actually the main motivator for me personally)
c) It allows easy switching between different configurations (which, admittedly, is quite rare, but it would help with the integration testing in #153)

@mtougeron mtougeron merged commit 0377b78 into mashery:master Mar 25, 2014
@rowanhill rowanhill deleted the rowanhill:configurable-config-json branch Mar 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment