Access counter API for isso blog.
This code explained in the blog post here.
- Clone the repository
git clone git@github.com:isso-719/counter-api.git
- Install the dependencies
cd counter-api
go mod download
- Auth on Google Cloud
gcloud auth application-default login
- Create .env file (REGION is optional, but if you deploy with deploy script, it's required)
cp .env.example .env
vi .env
(edit the .env file with your values)
- Run the application
go run cmd/main.go
- Set Google Cloud project
gcloud config set project <project-id>
- Deploy
make deploy