Skip to content

isso-719/counter-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

counter-api

Access counter API for isso blog.

This code explained in the blog post here.

Getting Started

  1. Clone the repository
git clone git@github.com:isso-719/counter-api.git
  1. Install the dependencies
cd counter-api
go mod download
  1. Auth on Google Cloud
gcloud auth application-default login
  1. 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)
  1. Run the application
go run cmd/main.go

Deploy

  1. Set Google Cloud project
gcloud config set project <project-id>
  1. Deploy
make deploy