- Go 1.21 or later
- templ CLI tool
- Docker (optional, for containerization)
Clone this repository
Copy the
.env.examplefile to.env:cp .env.example .envInstall dependencies:
go mod tidyInstall Air for live reload:
go install github.com/air-verse/air@latest alias air="~/go/bin/air"Install templ CLI tool:
go install github.com/a-h/templ/cmd/templ@latestInstall tailwind dependencies:
npm installRun the development server:
air
.
├── assets
│ └── css
│ └── favicon
│ └── images
├── components
├── handlers
├── models
├── services
├── main.go
├── Dockerfile
├── go.mod
├── go.sum
└── README.md
└── .air.toml
└── .env
- Use
airto start the development server with live reload. - Add new routes in
main.go. - Create handlers in the
/handlersdirectory. - Add templ components in the
/componentsdirectory.
Build the binary:
go build -o bin/serverRun the production server:
./bin/server
Build the Docker image:
docker compose build
Run the container:
docker compose up
This project is licensed under the MIT License - see the LICENSE file for details.
