twu
consumes the OpenWeatherMap API to provide weather information for a given city.
It's built with Go and uses HTMX to make the application interactive without writing any JavaScript.
-
To run the application, execute the following commands:
# run the application go run main.go # quit the application Ctrl + C
-
Once it's running, you can access the application at
http://localhost:8080
. -
To build the application, execute the following commands:
# build the application go build -o ./build/twu .
-
To run the built application, execute the following commands:
# run the application ./build/twu
-
To run the tests, execute the following commands:
# run the tests go test ./...
- Install Go.
- Install Visual Studio Code.
- Install Go extension.
- Clone and open this repository.
F1
->Go: Install/Update Tools
-> (select all) -> OK.
make
: execute the build pipeline.make help
: print help for the Make targets.
F1
→ Tasks: Run Build Task (Ctrl+Shift+B or ⇧⌘B)
to execute the build pipeline.
The release workflow is triggered each time a tag with v
prefix is pushed.
CAUTION: Make sure to understand the consequences before you bump the major version. More info: Go Wiki, Go Blog.
Notable files:
- .github/workflows - GitHub Actions workflows,
- .github/dependabot.yml - Dependabot configuration,
- .vscode - Visual Studio Code configuration files,
- .golangci.yml - golangci-lint configuration,
- .goreleaser.yml - GoReleaser configuration,
- Dockerfile - Dockerfile used by GoReleaser to create a container image,
- Makefile - Make targets used for development, CI build and .vscode/tasks.json,
- go.mod - Go module definition,
- tools.go - build tools.
Feel free to create an issue or propose a pull request.
Follow the Code of Conduct.