Database: Firebase, Firestore, Firebase Authentication
API Deployment: Golang
Server Deployment: Docker, GCP Compute Engine - Golang Instance, NGiNX
-
Put the private files into folder foodfeed_app (.env and .json files)
-
Install the dependencies (The hardest one)
go mod download
- Build the Docker image and run the container using the following commands:
docker build -t app .
docker run -d -p 3000:3000 app
TODO: Use Docker-compose to automate deployment
- (Optional - Should use when running on a server) Deploy Backend on ngrok
-
Open a new terminal and run ngrok:
ngrok http 3000
-
If not using ngrok, just use the localhost http://127.0.0.1:3000/
GET /
GET /coupons
POST /coupons/:id
GET /challenges
GET /challenges/active
POST /challenges/:id
GET /timer
PUT /timer
POST /timer/:duration
GET /timer/goal
GET /timer/firsttime
GET /nicotine/:duration
POST /nicotine/:value