Environment specific configuration for an AngularJS application
A couple of weeks ago I blogged about my experiment with Grails and AngularJS. When I deployed the application "in production" I realized that I needed to change the Urls for accessing the Grails backend. In development mode Grails is running in an own Tomcat instance on a different port, while in production the Grails backend and the AngularJS frontend application are both served from the same Tomcat instance. In fact, both parts get exported to one .war file. After a bit of research I came across the grunt-ng-constant task which is named to be a "plugin for dynamic generation of angular constant modules". Sounds like what I needed ;)