---
# System prepended metadata

title: Microservice

---

# Microservice 

[toc]

## gRPC

### update go path:`export PATH="$PATH:$(go env GOPATH)/bin"`

### Command for grpc ui`grpcui -plaintext 0.0.0.0:8080`


### Protocol Buffer
[ProtoBuf GitHub Repo](https://github.com/protocolbuffers/protobuf)

#### fixing google api import issue

[link](https://grpc-ecosystem.github.io/grpc-gateway/docs/tutorials/adding_annotations/)

cd into proto folder:

```
buf mod update
```

at root:

```
buf generate
```



### Google APIs
[Google APIs GitHub Repo](https://github.com/googleapis/googleapis)

### gRPC-Gateway 
[gRPC-Gateway GitHub Repo](https://github.com/grpc-ecosystem/grpc-gateway)
[gRPC-Gateway Documentation](https://grpc-ecosystem.github.io/grpc-gateway/#grpc-gateway)

### gRPC-Health-Probe
[gRPC-Health-Probe GitHub Repo](https://github.com/grpc-ecosystem/grpc-health-probe)

[health check example](https://medium.com/geekculture/implementing-healthchecks-in-grpc-containers-for-kubernetes-d5049989ab12)


mux
[mux github](https://github.com/gorilla/mux)
cors 
[cors github](https://github.com/rs/cors)


### Golang CORS - What it is and how to enable
[Enable Golang CORS](https://fale.io/blog/2021/07/28/cors-headers-with-grpc-gateway)

## Project example

1. [musular gopher](https://itnext.io/learning-go-mongodb-crud-with-grpc-98e425aeaae6)
2. [doesn't have part 2](https://medium.com/@mrendraaditama/grpc-in-go-with-mongodb-c2fa6f71e1f6)
3. [another example](https://levelup.gitconnected.com/microservices-with-go-grpc-api-gateway-and-authentication-part-1-2-393ad9fc9d30)


## Mongo DB

[how to use](https://blog.logrocket.com/how-to-use-mongodb-with-go/)

### Atlas
note: Create an account using mongodb atlas, IP address: `0.0.0.0/0`

## Docker 

## Kubernetes

## Ingress

## Helm

## GCP
[quick start guide](https://cloud.google.com/kubernetes-engine/docs/quickstarts/deploy-app-container-image#autopilot)
