diff --git a/Makefile b/Makefile index e7dc3d4..078ce39 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,10 @@ cover: lint: golangci-lint run +.PHONY: start +start: build-css + go run ./cmd/app + tailwindcss: curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-$(TAILWINDCSS_OS_ARCH) mv tailwindcss-$(TAILWINDCSS_OS_ARCH) tailwindcss diff --git a/README.md b/README.md index e62448e..8230f3f 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,41 @@ A starter kit for building a web app with gomponents, HTMX, and TailwindCSS in G Made with ✨sparkles✨ by [maragu](https://www.maragu.dev/). Does your company depend on this project? [Contact me at markus@maragu.dk](mailto:markus@maragu.dk?Subject=Supporting%20your%20project) to discuss options for a one-time or recurring invoice to ensure its continued thriving. + +## Getting started + +The easiest way to get started is to [Use this template](https://github.com/new?template_name=gomponents-starter-kit&template_owner=maragudk) to create a new repository. Or you could clone this repository the traditional way: + +```shell +git clone git@github.com:maragudk/gomponents-starter-kit.git your-app-name +``` + +After that, you can start the app with: + +```shell +make start +``` + +If you make style changes, watch the CSS with: + +```shell +make watch-css +``` + +You can run tests and linting with: + +```shell +make test lint +``` + +## Deploying + +The [CD workflow](.github/workflows/cd.yml) automatically builds a multi-platform Docker image and pushes it to the Github container registry GHCR.io, tagged with the commit hash as well as `latest`. + +You can try building the image locally with: + +```shell +make build-docker +``` + +Note that [you need the containerd image store enabled](https://docs.docker.com/desktop/containerd/#enable-the-containerd-image-store) for this to work.