Skip to content

bacnx/simplebank

Repository files navigation

SimpleBank

A simple back-end project using Golang, PostgreSQL.

Technologies

Setup local development

Setup database

  • Create network bank-network:
make network
  • Start postgres container:
make postgres
  • Create simple_bank database:
make createdb
make migrateup
  • Run db migration up 1 version:
make migrateup1
  • Run db migration down all versions:
make migratedown
  • Run db migration down 1 version:
make migratedown1

How to generate code

  • Generate SQL CRUD with sqcl:
make sqlc
  • Generate DB mock with gomock:
make mock
  • Create a new db migration:
make new_migration name=<migration_name>
  • Generate dbdocs from doc/db.dbml:
make dbdocs
  • Generate db schema:
make db_schema

How to run

  • Run server:
make server
  • Run test:
make test

About

A simple back-end project using Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages