Skip to content

Latest commit

 

History

History
58 lines (28 loc) · 1.11 KB

readme.md

File metadata and controls

58 lines (28 loc) · 1.11 KB

SBB - DevDay 2022 - Go Webserver & API with PostgreSQL

This repo contains all the code shown in my DevDay-Talk.

Links

Learn:

learn go with tests

Examples

Gophercon YouTube

Go-Libs:

Multiplexer Gorilla

PostgreSQL driver

Autocert

JWT

Logging

HowTo

Start at cmd/starter/main.go

Generate SQLC Code

To generate the sqlc go-classes run:

cd pkg/database && sqlc generate

Database migrations

To migrate a local postgresql database run:

# setup
migrate -source file://./migrations -database "postgresql://postgres:postgres@localhost:5432/devday?sslmode=disable" up 1

# teardown
migrate -source file://./migrations -database "postgresql://postgres:postgres@localhost:5432/devday?sslmode=disable" down 1