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 & freshRun webpack with production mode, go-bindata and go build in turn. All you have to do is run npm run build.
npm run buildThe 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.exeLicensed under the MIT license.