config.js 876 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. 'use strict';
  2. const path = require('path');
  3. const dayjs = require('dayjs');
  4. const config = {
  5. log: {
  6. file: {
  7. fileName: path.normalize('./logs/electron-' + dayjs().format('YYYY-MM-DD') + '.log'),
  8. level: 'silly', // error, warn, info, verbose, debug, silly
  9. format: '[{y}-{m}-{d} {h}:{i}:{s}.{ms}] [{level}] {text}',
  10. maxSize: '1048576' // 1048576 (1mb) by default.
  11. }
  12. },
  13. windowsOption: {
  14. width: 800,
  15. height: 600,
  16. minWidth: 800,
  17. minHeight: 600,
  18. webPreferences: {
  19. //webSecurity: false,
  20. nodeIntegration: true,
  21. preload: path.join(__dirname, 'preload.js')
  22. },
  23. //frame: false,
  24. //titleBarStyle: 'hidden'
  25. },
  26. egg: {
  27. title: 'electron-egg',
  28. env: 'prod',
  29. port: 7068,
  30. hostname: '0.0.0.0',
  31. workers: 1
  32. }
  33. }
  34. exports.get = function () {
  35. return config;
  36. };
  37. exports = module.exports;