How to switch environment in CompoundJS?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 17:33:15

问题


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/questions/14436958/how-to-switch-environment-in-compoundjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!