From 6692e26ed93d2396c37a2a46cbf11ded4c6057a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E9=B9=B0?= <17kungfuboy@gmail.com> Date: Wed, 4 Jan 2023 10:12:33 +0800 Subject: [PATCH] feat: script main.js --- src/workbench/node/package.json | 2 +- src/workbench/node/server/main.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/workbench/node/package.json b/src/workbench/node/package.json index d811b817d..bb107a9e8 100644 --- a/src/workbench/node/package.json +++ b/src/workbench/node/package.json @@ -8,7 +8,7 @@ "start": "pm2-runtime start ./server/main.js", "start:io": "pm2-runtime start ./server/socketio.js", "start:all": "yarn start && yarn start:io", - "start:all:pm2": "pm2 start ./server/main.js && pm2 start ./server/socketio.js", + "start:all:pm2": "pm2 start ./server/main.js", "watch": "pm2 list", "stop": "pm2 stop all", "test": "echo \"Error: no test specified\" && exit 1" diff --git a/src/workbench/node/server/main.js b/src/workbench/node/server/main.js index 02b4b0e2c..0884ea955 100644 --- a/src/workbench/node/server/main.js +++ b/src/workbench/node/server/main.js @@ -8,10 +8,11 @@ const _LibsCommon = require('../request/libs/common.js'); const koaBody = require('koa-body'); const Koa = require('koa'); const cors = require('@koa/cors'); -const socketio = require('./socketio'); +const socketio = require('./socketio.js'); const app = new Koa(); const port = process.env.TEST_SERVER_PORT || 4201; +console.log(port); app.use(cors()); app.use(koaBody());