Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global/easier access to config #7

Open
nicoechaniz opened this issue Dec 28, 2013 · 0 comments
Open

global/easier access to config #7

nicoechaniz opened this issue Dec 28, 2013 · 0 comments

Comments

@nicoechaniz
Copy link
Contributor

I've seen a configModel passed around, sometimes the whole thing, sometimes a portion.

For example, in fine.js:
this.routersView = new RoutersView({
proxyView: this.proxyView,
collection: this.routersColl,
configModel: this.configModel.get('routers'),
});

I just pushed a change to routers.js to replace a hardcoded api_url for the api_url value from the config, but in order to access this data I've had to add:
var appconfig = require('../../../../../config.json');

I guess with all the "magic tools" :) we are using, it should be easy to simplify this to something like:

var appconfig =require('libremapconfig')

so we don't need to have all those ../../ in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant