Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the purpose of setting NODE_ENV on Openshift

After installing ghost on Openshift why is it required to type these commands ?

rhc set-env NODE_ENV=production --app $appname
rhc app restart $appname
like image 216
user310291 Avatar asked Dec 08 '25 07:12

user310291


1 Answers

If you look at Ghost's skeleton config.js module, you will notice there are several discreet sections, such as development, test, production, that specify the settings for each runtime environment.

By default, most Node.js applications will run in development mode unless NODE_ENV is explicitly configured otherwise. Since Ghost is a Node.js application, it too respects NODE_ENV in order to configure runtime settings.

You should definitely not be running your Ghost server in production with the default development runtime environment.

like image 53
Filip Dupanović Avatar answered Dec 10 '25 22:12

Filip Dupanović