Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 512
senthil Avatar asked Nov 20 '25 17:11

senthil


1 Answers

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).

like image 67
Anatoliy Avatar answered Nov 22 '25 15:11

Anatoliy