Simple todo list website using the GoTTH stack.
- Populate environment variables, or use a
.env
file.
The Auth0 application must be a Regular Web Application with the following settings:
- Allowed Callback URLs:
http://localhost:8000/callback
- Allowed Logout URLs:
http://localhost:8000
export DATABASE_URL=postgres://user:password@localhost:5432/dbname?sslmode=disable
export AUTH0_DOMAIN=your.auth0.com
export AUTH0_CLIENT_ID=your-auth0-client-id
export AUTH0_CLIENT_SECRET=your-auth0-client-secret
export APP_URL=http://localhost:8000
export SESSION_KEY=$(openssl rand -base64 32)
export PORT=8000
- Run the following to setup the database.
go run -tags postgres github.com/golang-migrate/migrate/v4/cmd/migrate -path ./migrations -database ${DATABASE_URL} up
- Run the following to start the server.
go build -o go-website main.go
./go-website
- Generate
tailwind.css
and Templ components, Jet schema builder.
go generate
- Format files
go fmt ./...
go run github.com/a-h/templ/cmd/templ fmt ./internal/pkg/components