Reorganized API + added db migrations

Read the README file for more informations
This commit is contained in:
cdricms
2025-01-28 17:41:05 +01:00
parent 74118a5aa6
commit 501ffaea17
47 changed files with 608 additions and 219 deletions

18
backend/README.md Normal file
View File

@@ -0,0 +1,18 @@
# Prerequisites for development
- Installing dependencies: `go mod tidy`
- Verifying that the `.env` file is present.
## Running migrations
A migration cli is made available through the package: `./cmd/migrate`
At first it is need to run: `go run ./cmd/migrate db init` to initialize the
tables needed by golang's bun.
Then, if there migrations needed to be applied, run: `go run ./cmd/migrate db migrate`
Everything should be taken care of.
## Running the server
The server can be ran as easily as: `go run .`