zhangweicheng 6 years ago
parent
commit
d9c10d80e9
2 changed files with 1 additions and 4 deletions
  1. 0 3
      Dockerfile
  2. 1 1
      server.js

+ 0 - 3
Dockerfile

@@ -10,9 +10,6 @@ RUN cnpm install
 
 RUN gulp build
 
-EXPOSE 2060
-EXPOSE 2050
-
 ENV NODE_ENV=prod
 
 ENTRYPOINT ["babel-node", "--max-old-space-size=2048"]

+ 1 - 1
server.js

@@ -95,7 +95,7 @@ app.use(async function (req, res, next) {
 });
 //加载路由文件
 fileUtils.getGlobbedFiles('./modules/**/routes/*.js').forEach(function(modelPath) {
-    require(path.resolve(modelPath))(app);
+    if(modelPath.indexOf("import/routes")==-1) require(path.resolve(modelPath))(app);//排除掉导出导入服务
 });
 
 //app.use(express.static(_rootDir+"/web"));