This project is a boilerplate for Facebook React with Golang server Gin.
- Install some golang tools by
go get
go get -u github.com/jteeuwen/go-bindata/...
go get -u github.com/elazarl/go-bindata-assetfs/...
go get -u github.com/gin-gonic/gin
go get -u github.com/gin-gonic/contrib/static
go get -u github.com/pilu/fresh
go get github.com/mitchellh/gox
- Install JavaScript dependencies
npm install
- Generate bindata.go with debug mode.
npm run bindata
- Start webpack and gin with watch mode.
npm run dev & fresh
Run webpack with production mode, go-bindata and go build in turn. All you have to do is run npm run build
.
npm run build
The artifacts are created under ./dist
directory.
$ ls -l dist
total 9936
-rw-r--r-- 1 root root 10175248 Feb 25 10:10 web_linux_amd64
-rwxr-xr-x 1 root root 10172416 Feb 25 10:10 web_windows_amd64.exe
Licensed under the MIT license.