How to switch environment in CompoundJS?
问题 I'm very new to CompoundJS. I'm working on a sample application which accesses data in MongoDB. I'm wondering if there is any way to switch environment in CompoundJS as we do in Rails (RAILS_ENV = development/test/production). Any help would be appreciated. Thanks in advance. 回答1: As usual in nodejs you can use NODE_ENV variable (same as RAILS_ENV in ruby/rails): NODE_ENV=production node . Should work for compound (from the working dir of your compound project). 来源: https://stackoverflow.com