Skip to content

global/easier access to config #7

@nicoechaniz

Description

@nicoechaniz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions