Use Go, Webpack to build and package web application starter kit.
- Use sweb to make web server
- Use webpack to package all the frontend assets
- Use webpack-dev-server to support HMR
- Depends on GNU Make and fswatch
Demo:
- Use material-design-lite SCSS version as the basic style templates and customize the color and themes
- Use React to build a MDL Component button
- run
make devto start a local development watcher, auto watch assets change and go code change, restart the go web server - run
make distto create distribution packages, including all the assets, templates and binary which can be deployed - A
DemoApicontroller rendering JSON response - A
DemoControllercontroller rendering HTML response using templates
Big thanks to:
Hot module reload
GO Web Servershould render all aseets with prefix the dev-server domainhttp://localhost:8000- As config in
webpack.config.js, all the request (except the hot-update ones ) is proxied toGO web Server
Missing Parts:
- Sprite images management and auto-generation
- Config the port of both Go Web Server and webpack-dev-server, and config each one for the other
Contributions:
- acecode.tk@gmail.com for the HMR
MIT