I am trying to build a Polymer webapp that relies on REST APIs based on a Node.js backend. I have scaffolded my project with Yeoman and using Mongoskin to create a RESTful interface with the backend.
I am using the core-ajax element passing it my localhost url when I am developing, however every time I deploy to heroku I have to change this url to connect to the right backend APIs.
I believe I can access the process.env.NODE_ENV variable only backend side, therefore I am asking if there is a way to tell grunt to change this url when I build my dist folder.
The only option I have in mind is:
Is there a more elegant way to do that?