Search code examples
node.jsironworker

How can I set NODE_ENV variable for ironworker (iron.io) task?


Is there a way to set/configure NODE_ENV for an ironworker task? It's not set in the process.env output. Because of that the config module loads config/development.json configuration file.


Solution

  • There are a couple ways to set this value. First you can send ENV params with the -e flag, as noted here https://github.com/iron-io/dockerworker/tree/master/node#2-test-locally

    Iron actually recommends that you provide this information as part of the configuration and payload when creating a task.