Skip to content

satimoto/go-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8dd3384 · Jul 23, 2024
Jun 17, 2022
Mar 1, 2024
Apr 17, 2024
Apr 16, 2024
Jul 11, 2022
Nov 14, 2022
Aug 22, 2022
May 28, 2022
Sep 28, 2021
Sep 9, 2022
Apr 17, 2024
Apr 17, 2024
May 18, 2022
Oct 4, 2022

Repository files navigation

go-api

Satimoto public API using golang

On schema changes

Whenever the SQL or GraphQL schema files change the following should be run

Config

Some dependencies require using bzr repository

brew install bzr
go env -w GOVCS="launchpad.net:bzr,public:git|hg,private:all"

Generate the GraphQL resolvers

Generates the GraphQL models and resolvers from schema files

go mod download github.com/99designs/gqlgen
gqlgen

Development

Run

go run ./cmd/api

Build

GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags '-s -w' -o bin/main cmd/api/main.go