Files
pqs-9100_client/electron/config/config.default.js
2025-12-10 18:47:17 +08:00

86 lines
2.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use strict';
const path = require('path');
const {getBaseDir} = require('ee-core/ps');
/**
* 默认配置
*/
module.exports = () => {
return {
openDevTools: false,
singleLock: true,
windowsOption: {
title: 'NPQS9100-自动检测平台',
menuBarVisible: false, // 隐藏菜单栏
width: 1920,
height: 1000,
minWidth: 1024,
minHeight: 640,
webPreferences: {
//webSecurity: false,
contextIsolation: false, // false -> 可在渲染进程中使用electron的apitrue->需要bridge.js(contextBridge)
nodeIntegration: true,
//preload: path.join(getElectronDir(), 'preload', 'bridge.js'),
},
frame: true,
show: false, // 初始不显示,等待服务启动完成后再显示
icon: path.join(getBaseDir(), 'public', 'images', 'logo-32.png'),
},
logger: {
level: 'INFO',
outputJSON: false,
appLogName: '9100.log',
coreLogName: '9100-core.log',
errorLogName: '9100-error.log'
},
// 远程web地址
remote: {
enable: false,
url: ''
},
socketServer: {
enable: false,
port: 7070,
path: "/socket.io/",
connectTimeout: 45000,
pingTimeout: 30000,
pingInterval: 25000,
maxHttpBufferSize: 1e8,
transports: ["polling", "websocket"],
cors: {
origin: true,
},
channel: 'socket-channel'
},
httpServer: {
enable: false,
https: {
enable: false,
key: '/public/ssl/localhost+1.key',
cert: '/public/ssl/localhost+1.pem'
},
host: '127.0.0.1',
port: 7071,
},
mainServer: {
indexPath: '/public/dist/index.html',
channelSeparator: '/',
},
// MySQL配置
mysql: {
enable: true,
autoStart: true, // 应用启动时自动启动MySQL
path: path.join(getBaseDir(), 'mysql'),
connection: {
host: 'localhost',
port: 3306,
user: 'root',
password: 'njcnpqs',
database: 'npqs9100_db',
charset: 'utf8mb4'
}
}
}
}