Closed sergeykosik closed 11 years ago
Yes, you definitely need this in a real project. But why do think it should be included in this skeleton project?
In my real project I have a config module which holds an injectable configFactory where all config is placed. But thats just the same as the example modules "about" and "contact", it would add nothing to this project as a skeleton.
Or isn't, it?
I believe it would be easier for beginners to see where to place constants once such a place is available out of the box. Initially I tried to set the baseUrl constant in the app.js, but then realised that my co-workers will have to set their own value, which shouldn't be committed to the repo. Also, I was stumbled on testing my controllers, which had dependencies on the services with constant baseUrl as that constant was not available.
I'll have to think this through if there is enough reason to implement it here. Right now, I think its very much dependent on the individual situation of the developer team.
But I will think about it.
+1 for providing an example of where to put constants for configuration
This project should also be helpful for everyone to kickstart a new app, and since everyone has to do that, you could provide a good solution for this.
it took a while longer as expected bc of personal problems, but I just have introduced a config system.
There is now a new module: "config" with configuration files for every environment you want, standard config is in "config/configuration.js", add new files as "config/configuration_environmentname.js" for every new environmnet you want. They get picked up automatically during build.
You run builds for environments via "grunt install:environmentname", normal "grunt install" uses standard config.
I have included a sample environment file for a "prod" environment.
just released 0.2.0, closing this
I like your solution :+1:
It would be useful to introduce some config file, so to share global constants and values across modules. Services might need to use the global baseUrl value. The config file should be separated out to ensure team members can have there own specific settings.