Skip to content

htcuong/demo

Repository files navigation

Demo

Stack

Golang version 1.19

Framework go gin

Database MySQL 8.0

Getting started

Environment Variables

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

Init the database

Start MySQL by docker-compose

docker-compose up mysql -d

Create database, tables

bash ./init-mysql.sh

Local Development Environment

Start with code

go run cmd/main.go api

Start with docker-compose

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

Start.sh

     bash ./start.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published