Skip to content

BehemothLtd/aio-server

Repository files navigation

Intall Go

brew install go

Install go-migrate

brew install golang-migrate

DB Migration

Create new migration

migrate create -ext sql -dir database/migrations -seq create_users_table

Migrate

make db.migrate

Install dependencies

Install go-enum

curl -fsSL "https://github.com/abice/go-enum/releases/download/v0.6.0/go-enum_$(uname -s)_$(uname -m)" -o go-enum

chmod +x go-enum (Not required maybe)
go mod tidy

Kickoff

go run main.go

Kickoff async server

go run workers/main.go

Monitor Async queues

.zshrc

export GOPATH=$HOME/go
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
go install github.com/hibiken/asynq/tools/asynq@latest

cd $GOPATH/bin

asynq dash

Enum generator

note that --sqlint is only for enums of DB model that need enum attribute to be present as string but stored as int in DB

./go-enum --sqlint --marshal -f ./enums/{path_to_enum_file}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages