module
0.0.0-20230821172644-9ec37df94ace
Repository: https://github.com/bieluk/library-backend.git
Documentation: pkg.go.dev
# README
Simple Library Backend
This repo contains Golang library backend REST API using Gin framework.
This simple application uses Viper library for handling configuration, Gorm as sql ORM for postgresql and goose as migration tool.
Application has implemented repository for Postgresql and Mongo DB.
Application is containerised with docker-compose.
Application endpoints are documented and accessible under URL: http://"host":"port"/swagger/index.html#/
To run application:
- Set env variables, defaults are in
app.env
file, setDATABASE_ENGINE
variable toPOSTGRES
orMONGO
to use database you want. - If you use Postgresql as chosen database you need to migrate Postgresql DB schema. To do that you can run script
migrate_db.sh
fromtools
catalog (the script uses goose migration tool). - Run command
docker-compose up -d
to run all services in background. - Application is ready to use.