code directory:./frontend

  • any front-end technology can be used
  • the front-end module in the project is only a demo. You can modify or delete it at will.
  • vue2, vue3, react, Angular, html, and so on
  1. simple configuration

    1. Open config profile:./electron/config.default.js, The following configurations can be modified:
    2. developmentMode: {
    3. default: 'vue', // The front and rear ends are separated by default, and Vue is used
    4. mode: {
    5. // The front and back ends are separated and developed using Vue. The port is the same as the service started by Vue
    6. vue: {
    7. hostname: 'localhost',
    8. port: 8080
    9. },
    10. // The front and rear ends are separated and developed using react. The port is the same as the serve started by react
    11. react: {
    12. hostname: 'localhost',
    13. port: 3000
    14. },
    15. html: {
    16. hostname: 'localhost',
    17. indexPage: 'index.html' // home
    18. },
    19. }
    20. },
  2. only one file is required: ipcRenderer.js

    1. # Your front-end project needs to import this file to communicate with the electronic business layer
    2. # Vue3 or react user, please modify its syntax (currently vue2)
  3. start

  • vue mode [default]] ```

    1:【enter the front-end directory】

    cd ./frontend npm run serve

2:【project directory】

npm run dev

  1. - react mode, and vue
  2. - html mode (not recommended, use vue and react to keep pace with the times)

1:enter the front-end directory and create dist directory

cd ./frontend && mkdir dist

2: writing HTML files

index.html

3:【project directory】,start the electron service

npm run dev ```