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
simple configuration
Open config profile:./electron/config.default.js, The following configurations can be modified:
developmentMode: {
default: 'vue', // The front and rear ends are separated by default, and Vue is used
mode: {
// The front and back ends are separated and developed using Vue. The port is the same as the service started by Vue
vue: {
hostname: 'localhost',
port: 8080
},
// The front and rear ends are separated and developed using react. The port is the same as the serve started by react
react: {
hostname: 'localhost',
port: 3000
},
html: {
hostname: 'localhost',
indexPage: 'index.html' // home
},
}
},
only one file is required: ipcRenderer.js
# Your front-end project needs to import this file to communicate with the electronic business layer
# Vue3 or react user, please modify its syntax (currently vue2)
start
2:【project directory】
npm run dev
- react mode, and vue
- 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 ```