Right now the best way I see to get the instances architecture is to use something like this. Which I don’t really like. Am I overlooking something? Otherwise; How would you feel about adding an environment variable or a function for it?
Yeah I think this would be great, in addition to having them for development vs. production vs. test environments.
Couldn’t we just use the NODE_ENV
for that? Or are you worried about potentially inconsistent behavior from node packages that could that lead to weirdness?
Yeah, NODE_ENV would be one option; right now Meteor doesn’t give a great way to really take advantage of it. For example, it’s currently pretty hard to have a package that includes extra debug features in development mode, but doesn’t have that code at all in production.