This is a Golang web boiler plate which is using web framework Fiber and fantastic ORM Gorm
First build docker image with docker-compose
docker-compose build
then fire docker containers using following command
docker-compose up -d
Create a rest_task.ini configuration file and place it wherever you want. Configuration should look like this
[database]
host = localhost
name = postgres
password =postgres
put this line into ~/.bashrc file
export SETTINGS=path/to/config/rest_task.ini
change path/to/config/
with your config path.
Run make command it will download all libraries and builds binary files
make
./bin/app --help
serve_api
command starts server on 3000
port.
./bin/app serve_api