Golang version 1.19
Framework go gin
Database MySQL 8.0
Create a .env
file in the root demo directory and copy the default values from the .env.template
file
cp .env.template .env
Update the env value
Start MySQL by docker-compose
docker-compose up mysql -d
Create database, tables
bash ./init-mysql.sh
go run cmd/main.go api
The dependencies for this project have all been provisioned for you through docker-compose. In order to run the application locally, run the following from the root demo directory
docker-compose up # start the application
docker-compose down # stop the application
docker-compose down --remove-orphans --volumes; docker-compose build; docker-compose up # rebuild the application and rerun
bash ./start.sh