muazwzxv / Backend_masterclass_udemy

Me doing a udemy course, hoping to find gap in my knowledge.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hello there, me going through Udemy course here

Learnings so far

  • Design the database for a simple bank project, (I added a users table, I'll adapt as the course goes)
  • Using start and commit to ensure atomicity among multiple queries for a proper workflow
  • Replicate a situation where deadlock might happened
  • Learn how to mitigate deadlock
    • Example shows a situation where we want to update the balance of 2 accounts in one atomic transaction
  • Setup a Go server
    • Currently the file structure in the repo are my own designs. (This part I'm not following the course, a good time to practice scaffolding a Go backend repo)
  • Generating mock and writing tests
  • Doing CRUD on some of the API

Prerequisite

  • Have Go version higher than 1.9
  • Have make installed
  • Have docker installed
  • Have golang-migrate installed

Create container for our dependencies

docker compose up

Create database in postgres

make database.create

Run migrations

make migrations.up

Creating new migrations file

migrate create -ext sql -dir /db/migrations -seq $(MIGRATIONS_NAME)

About

Me doing a udemy course, hoping to find gap in my knowledge.


Languages

Language:Go 97.2%Language:Makefile 2.3%Language:Shell 0.5%