go mod init github.com/gal16v8d/app-registry.git
then:
go mod tidy
add dependency:
go get -u {dependency_name_here}
ie:
go get -u github.com/gin-gonic/gin
Download mysql docker image:
docker pull mysql
Run instance like:
docker run -p 3306:3306 --name mysqldb -e MYSQL_ROOT_PASSWORD={your_pass_here} -d mysql
Conditional steps in case mysql db don't connect:
docker exec -it mysqldb /bin/bash
mysql -uroot -p -A
select user, host from mysql.user;
update mysql.user set host='%' where user='root';
flush privileges;
exit
- Please be sure of create the mysql db using something similar to the
init_db.sql
file located into thedev_tools
folder - Then, go to
cmd/server
folder inspect the.env.sample
file, you might need a.env
file with your real user, pass and db name in the same format as you find in the sample. - Then
cd cmd/server
then:
go run .