acecode / web-starter-kit

Use Go, Webpack to build and package web application starter kit.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

web-starter-kit

Use Go, Webpack to build and package web application starter kit.

  1. Use sweb to make web server
  2. Use webpack to package all the frontend assets
  3. Use webpack-dev-server to support HMR
  4. Depends on GNU Make and fswatch

Demo:

  1. Use material-design-lite SCSS version as the basic style templates and customize the color and themes
  2. Use React to build a MDL Component button
  3. run make dev to start a local development watcher, auto watch assets change and go code change, restart the go web server
  4. run make dist to create distribution packages, including all the assets, templates and binary which can be deployed
  5. A DemoApi controller rendering JSON response
  6. A DemoController controller rendering HTML response using templates

Big thanks to:

  1. go-starter-kit
  2. Webpack your bags
  3. react-transform-hmr
  4. babel-preset-react-hmre

Hot module reload

See webpack-dev-server doc

  1. GO Web Server should render all aseets with prefix the dev-server domain http://localhost:8000
  2. As config in webpack.config.js, all the request (except the hot-update ones ) is proxied to GO web Server

Missing Parts:

  1. Sprite images management and auto-generation
  2. Config the port of both Go Web Server and webpack-dev-server, and config each one for the other

Contributions:

  1. acecode.tk@gmail.com for the HMR

License

MIT

About

Use Go, Webpack to build and package web application starter kit.

License:MIT License


Languages

Language:Go 51.1%Language:JavaScript 33.0%Language:HTML 7.7%Language:Makefile 6.4%Language:CSS 1.9%