docs: readme

main
Raphaël 2024-02-28 16:05:55 +04:00 committed by GitHub
parent 7259f75917
commit 8b33032082
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 24 additions and 4 deletions

View File

@ -2,18 +2,38 @@
This repository demonstrates how to use gRPC with Go and various plugins. It's a simple API to manage notes. It uses grpc-gateway to handle HTTP requests and openapi to define API specs.
## Demonstrated features
- buf.build framework
- grpc gateway + openapi specs and swagger UI
- graceful server shut down (designed for orchestration systems such as k8s)
- gRPC [health check protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md#grpc-health-checking-protocol).
- rpc message validation
⚠️ For demo purposes, encryption wasn't properly handled in this project.
## Installation
This project uses go1.20.
```
$ make install-tools
$ make generate
$ make build
```
### Run the server
```
$ make build
$ ./bin/server
```
$ ./bin/server -h
Usage of ./bin/server:
-grpc-server-endpoint string
gRPC server endpoint (default "localhost:9090")
-http-server-endpoint string
HTTP server endpoint (default "localhost:8000")
```
#### Health checking
```
$ ./bin/
```