https://github.com/slali87/summingmicroservice
A Go microservice that computes and returns the sum of two numbers.
https://github.com/slali87/summingmicroservice
Last synced: 7 months ago
JSON representation
A Go microservice that computes and returns the sum of two numbers.
- Host: GitHub
- URL: https://github.com/slali87/summingmicroservice
- Owner: slali87
- License: gpl-3.0
- Created: 2024-07-05T13:57:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-18T12:25:44.000Z (about 1 year ago)
- Last Synced: 2025-01-15T10:08:33.769Z (9 months ago)
- Language: Go
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SummingMicroservice
A Go microservice that computes and returns the sum of two numbers.
The repository also includes an index.html file so that the API can be used through a graphical interface.### **Commands of local use (dev version):**
```
make build
make run
curl "127.0.0.1:8081/sum?a=1&b=4" # For testing
google-chrome "127.0.0.1:8081/sum?a=1&b=4" # For testing
google-chrome "127.0.0.1:8081" # For testing (GUI)
```### **Commands of local Docker use (dev version):**
```
make local-docker-build
make local-docker-run
curl "0.0.0.0:8081/sum?a=1&b=4" # For testing
google-chrome "0.0.0.0:8081/sum?a=1&b=4" # For testing
google-chrome "0.0.0.0:8081" # For testing (GUI)
```### **Commands of GCloud use (staging version):**
```
export ENVIRONMENT=staging
export GCP_PROJECT_ID= # Replace the !!!
make gcloud-docker-init # This only needs to be run once !
make gcloud-docker-build
make gcloud-docker-push # This pushes the docker image into the GCloud's Container Registry
make gcloud-run-deploy # This deployes the pushed docker image into the GCloud's Cloud Run
google-chrome "https:///sum?a=1&b=4" # For testing
google-chrome "https://" # For testing (GUI)
```### **Commands of GCloud use (production version):**
```
git push origin main # This delivers the changes to GitHub main and the GitHub Actions builds, pushes and deployes it to GCloud.
google-chrome "https:///sum?a=1&b=4" # For testing
google-chrome "https://" # For testing (GUI)
```Based on https://github.com/SanFranciscobolJottem/penguin-api