Skip to content

bradydean/go-website

Repository files navigation

go-website

Simple todo list website using the GoTTH stack.

tools

setup

  1. 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
  1. 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
  1. Run the following to start the server.
go build -o go-website main.go
./go-website

development

dependencies

shortcuts

  1. Generate tailwind.css and Templ components, Jet schema builder.
go generate
  1. Format files
go fmt ./...
go run github.com/a-h/templ/cmd/templ fmt ./internal/pkg/components

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages