https://github.com/royrusso/react_express_electron
Electron sample of a React, Vite, Express app, deployable on any platform.
https://github.com/royrusso/react_express_electron
Last synced: over 1 year ago
JSON representation
Electron sample of a React, Vite, Express app, deployable on any platform.
- Host: GitHub
- URL: https://github.com/royrusso/react_express_electron
- Owner: royrusso
- License: apache-2.0
- Created: 2025-01-27T14:47:25.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-28T19:53:52.000Z (over 1 year ago)
- Last Synced: 2025-02-05T15:46:56.701Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 260 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Electron + Vite + React + Express
This is a template for building a desktop application using Electron, Vite, React, and Express. It is a full-stack application that uses Electron to run the React frontend and Express backend. The frontend is built using Vite, and the backend is built using Express.
The build will generate a standalone desktop application that can be run on Windows, macOS, and Linux.
## Running Locally
1. Clone the repository
2. Run `npm install` to install the dependencies
3. `cd frontend` and run `npm install` to install the frontend dependencies
4. You may need to run `npm run build` in the `frontend` folder to build the frontend.
5. Run `npm run dev` to start the development server
6. React app will be running on [http://localhost:5173](http://localhost:5173)
## Building the Installers
1. Run `npm run build` to build the installers
2. The installers will be generated in the `dist` folder
### (Optiona) Manual builds
- Run `electron-builder build --mac` to build the macOS installer
- Run `electron-builder build --win` to build the Windows installer
- Run `electron-builder build --linux` to build the Linux installer
Installers will be generated in the `dist` folder.
## Known Issues
- The github action that's supposed to build the installers, builds a broken `.dmg` file, due to it not being signed.
### GitHub Action
The action triggers on a new tag created with the format `v*.*.*`. It will build the installers and upload them as release assets.
```
git tag v1.0.0 # Create a new tag
git push origin v1.0.0 # Push the tag to GitHub
```