Go Gin Demo GoLang
1. Fetch Dependency:
go mod tidy2. Environment Settings:
Copy docker/.env.sample to docker/.env and write environment details. Then export using this command.
cp docker/.env{.sample,}
export $(cat docker/.env | xargs)3. Build Project:
go build4. Run Application:
./gin-demoOr run with docker:
cd docker
docker-compose up --buildNow your api is running on 3000 port (if you use docker then port is 3001).