Is there a way to detect if a worker role is in staging or production.
I want to do this to supress functionality in the staged environment until it is swapped to pr
The windows azure sdk for node will give you the information you are looking for - https://github.com/WindowsAzure/azure-sdk-for-node
Specifically - azure.RoleEnvironment.getCurrentRoleInstance
or azure.RoleEnvironment.getRoles
should give you the information necessary to trigger functionality.
And in case anyone needs to distinguish between Azure Cloud / Azure Emulator, the emulator configures an EMULATED
environment variable accessible from process.env
when run under the azure emulator. Which is also helpful if you are trying to distinguish between the emulator and the built-in node server.