Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niklus/go-embed
Embed a React App into an executable binary with GO
https://github.com/niklus/go-embed
go golang react
Last synced: 3 days ago
JSON representation
Embed a React App into an executable binary with GO
- Host: GitHub
- URL: https://github.com/niklus/go-embed
- Owner: Niklus
- Created: 2023-02-28T10:25:51.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-02-28T10:26:03.000Z (over 1 year ago)
- Last Synced: 2024-04-15T04:42:07.342Z (7 months ago)
- Topics: go, golang, react
- Language: JavaScript
- Homepage:
- Size: 132 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Go Embed
Embed a React App into an executable binary with GO.
This is achieved by the following:
1. Change into the client directory
```bash
cd client
```
2. Then run```bash
npm install
```
```bash
npm run build
```This will install, build and move your dist folder into the server directory
3. Then change into the server directory
```bash
cd server
```4. Then run
```go
go build -o app main.go
```This will create an executable binary file named `app` that you can run
by double clicking or with the following command in the terminal```bash
./app
```