config.default.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import path from 'path';
  2. import { getBaseDir } from 'ee-core/ps';
  3. import { type AppConfig } from 'ee-core/config';
  4. const config: () => AppConfig = () => {
  5. return {
  6. openDevTools: false,
  7. singleLock: true,
  8. windowsOption: {
  9. title: '中赢打印中心',
  10. width: 980,
  11. height: 650,
  12. minWidth: 400,
  13. minHeight: 300,
  14. webPreferences: {
  15. contextIsolation: false,
  16. nodeIntegration: true,
  17. },
  18. autoHideMenuBar: true,
  19. frame: true,
  20. show: false,
  21. icon: path.join(getBaseDir(), 'public', 'images', 'logo-32.png'),
  22. },
  23. logger: {
  24. level: 'INFO',
  25. outputJSON: false,
  26. appLogName: 'print.log',
  27. coreLogName: 'print-core.log',
  28. errorLogName: 'print-error.log',
  29. },
  30. remote: {
  31. enable: false,
  32. url: 'http://electron-egg.kaka996.com/',
  33. },
  34. socketServer: {
  35. enable: true,
  36. port: 7070,
  37. path: "/socket.io/",
  38. connectTimeout: 45000,
  39. pingTimeout: 30000,
  40. pingInterval: 25000,
  41. maxHttpBufferSize: 1e8,
  42. transports: ["polling", "websocket"],
  43. cors: {
  44. origin: true,
  45. },
  46. channel: 'socket-channel',
  47. },
  48. httpServer: {
  49. enable: true,
  50. https: {
  51. enable: false,
  52. key: '/public/ssl/localhost+1.key',
  53. cert: '/public/ssl/localhost+1.pem',
  54. },
  55. host: '127.0.0.1',
  56. port: 7071,
  57. },
  58. mainServer: {
  59. indexPath: '/public/dist/index.html',
  60. }
  61. };
  62. };
  63. export default config;