Browse Source

BugFix for build:prod script

Yuki Takei 7 years ago
parent
commit
594b4ba4d1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/server/crowi/index.js

+ 1 - 1
src/server/crowi/index.js

@@ -358,7 +358,7 @@ Crowi.prototype.start = async function() {
   await this.init();
   await this.init();
   const express = await this.buildServer();
   const express = await this.buildServer();
 
 
-  const server = this.crowiDev.setupServer(express);
+  const server = (this.node_env === 'development') ? this.crowiDev.setupServer(express) : express;
 
 
   const serverListening = server.listen(this.port, () => {
   const serverListening = server.listen(this.port, () => {
     logger.info(`[${this.node_env}] Express server is listening on port ${this.port}`);
     logger.info(`[${this.node_env}] Express server is listening on port ${this.port}`);