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 dev
to start a local development watcher, auto watch assets change and go code change, restart the go web server - run
make dist
to create distribution packages, including all the assets, templates and binary which can be deployed - A
DemoApi
controller rendering JSON response - A
DemoController
controller rendering HTML response using templates
Big thanks to:
Hot module reload
GO Web Server
should 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:
- [email protected] for the HMR
MIT