From 80cd4769ceb2d9983acb590b3d56bdf18d3c3a0c Mon Sep 17 00:00:00 2001 From: gaoshuaixing Date: Fri, 4 Mar 2022 16:40:24 +0800 Subject: [PATCH] add html mode && socket --- electron/config/config.default.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/electron/config/config.default.js b/electron/config/config.default.js index 739814a..5a3e211 100644 --- a/electron/config/config.default.js +++ b/electron/config/config.default.js @@ -14,7 +14,7 @@ module.exports = (appInfo) => { /* 开发模式配置 */ config.developmentMode = { - default: 'vue', + default: 'html', mode: { vue: { hostname: 'localhost', @@ -23,7 +23,11 @@ module.exports = (appInfo) => { react: { hostname: 'localhost', port: 3000 - } + }, + html: { + hostname: 'localhost', + indexPage: 'index.html' + }, } }; @@ -63,9 +67,10 @@ module.exports = (appInfo) => { url: 'https://discuz.chat/' // Any web url }; - /* 内置web服务 */ - config.webServer = { - port: 7068 + /* 内置socket服务 */ + config.socketServer = { + port: 7070, // 默认端口 + isDynamic: false // 如果值为false,框架默认使用port端口(如果默认端口被使用,则随机获取一个);如果为true,默认端口无效,框架随机生成 }; /* 应用自动升级 (可选) */