lrf 2 vuotta sitten
vanhempi
commit
302ed16bc7
3 muutettua tiedostoa jossa 23 lisäystä ja 2 poistoa
  1. 2 0
      .gitattributes
  2. 19 0
      ecosystem.config.js
  3. 2 2
      src/config/config.prod.ts

+ 2 - 0
.gitattributes

@@ -0,0 +1,2 @@
+src/config/** merge=ours
+ecosystem.config.js merge=ours

+ 19 - 0
ecosystem.config.js

@@ -0,0 +1,19 @@
+'use strict';
+// 服务设置
+const app = '商城-聊天服务';
+module.exports = {
+  apps: [
+    {
+      name: app, // 应用名称
+      script: './bootstrap.js', // 实际启动脚本
+      out: `./logs/${app}.log`,
+      error: `./logs/${app}.err`,
+      watch: [ // 监控变化的目录,一旦变化,自动重启
+        'dist'
+      ],
+      env: {
+        NODE_ENV: 'production', // 环境参数,当前指定为生产环境
+      },
+    },
+  ],
+};

+ 2 - 2
src/config/config.prod.ts

@@ -1,11 +1,11 @@
 import { MidwayConfig } from '@midwayjs/core';
 const ip = '127.0.0.1';
-const suffix = '_dev';
+const suffix = '';
 export default {
   // use for cookie sign key, should change to your own and keep security
   keys: '1669597198171_1000',
   koa: {
-    port: 12214,
+    port: 12114,
     globalPrefix: '/point/chat/v1/api',
   },
   swagger: {