This is a learning project.
The primary focus is on building a Svelte SPA (Single-page Application) that can be shipped as Golang binary. And docker container. It includes a CLI interface that will be used to pass in runtime environment variables. The server side provides an API and SSE (Server Side Events) to stream data to the frontend.
I took inspiration from projects like Hashicorp Nomad and PocketBase.
As it is a learning project the code may be in various stages of chaos!
After building the binary (see below) it can be run with the following commands in two separate terminals
Start the server
./bin/cli server
Optionally open the UI in a browser http://localhost:3000/
Run the CLI command hello
which calls the API
./bin/cli hello
Optionally the server port and client endpoint can be changed with either flags or environment variables
export THING_SERVER_PORT=3001
export THING_ENDPOINT="http://localhost:3001"
make build
make server
make dev