|
|
@@ -9,6 +9,7 @@ var debug = require('debug')('crowi:crowi')
|
|
|
|
|
|
, mongoose = require('mongoose')
|
|
|
|
|
|
+ , helpers = require('./helpers')
|
|
|
, models = require('../models')
|
|
|
;
|
|
|
|
|
|
@@ -41,6 +42,10 @@ function Crowi (rootdir, env)
|
|
|
|
|
|
this.env = env;
|
|
|
this.node_env = this.env.NODE_ENV || 'development';
|
|
|
+ if (helpers.hasProcessFlag('prod') || helpers.hasProcessFlag('production')) {
|
|
|
+ this.node_env = process.env.NODE_ENV = 'production';
|
|
|
+ }
|
|
|
+
|
|
|
this.port = this.env.PORT || 3000;
|
|
|
|
|
|
this.events = {
|