A web application example showing the use of WebComponents with Go as small executable server.
- an artifact as small as possible that provides a UI (less than 10 MB)
- use as few UI frameworks as possible
- as few configuration files as possible
- fast build times
- multi-platform support (arm and amd64)
Go >= 1.16 supports embedding files to executable. So it is possible to create very small executables that contain all needed assets.
npm as dependency management tool.
Build tool ParcelJS places great emphasis on convention over configuration. Here, the goal of having to configure as little as possible is supported.
lit-html is a small Javascript library, which allows to create components in a simple way (based on WebComponents). This gives you a React feeling.
Makefile to build and run application and docker images on your local machine.
Dockerfile to build docker image.
Github Actions to build (and push) docker image on each commit.
This command starts a backend mock server (see src/mock/backend-mock.go
) and allows using the full parcel development support.
$ make frontend-run
This command builds an executable for your platform.
$ make frontend-build
$ make backend-build
$ ./bin/server
Open localhost:8080
in your browser.
This command build a docker image for your platform.
$ make docker-build
$ make docker-run
Open localhost:8080
in your browser.
For multi-platform support see github actions.
See docker-compose demo and kubernetes demo.