Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raezil/bikerental-grpc
https://github.com/raezil/bikerental-grpc
golang grpc grpc-gateway grpc-gateway-example prisma-go
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/raezil/bikerental-grpc
- Owner: Raezil
- Created: 2024-10-24T14:40:21.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-25T15:16:23.000Z (3 months ago)
- Last Synced: 2024-10-25T18:49:51.175Z (3 months ago)
- Topics: golang, grpc, grpc-gateway, grpc-gateway-example, prisma-go
- Language: Go
- Homepage:
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BikeRental-GRPC
Sample biking rental service using grpc.
## Kubernetes
### Run Docker
```
docker build -t app:latest .
docker login
docker push $docker_username/app:latest
```- Apply kubectl
```
minikube start
cd k8s
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
```
- Port Foward
```
kubectl port-forward service/app-service 8080:8080 -n default
```
- Check pods
```
kubectl get pods -n default
kubectl describe pod $NAME -n default
```
## Sample curl requests
Register:
```
curl --http2 -X POST http://localhost:8080/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "password123",
"name": "John",
"surname": "Doe",
"age": 30
}'
```
Log in:
```
curl --http2 -X POST http://localhost:8080/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "password123"
}'```