https://github.com/root27/rust-grpc
Rust Grpc Server and Client with MongoDB
https://github.com/root27/rust-grpc
Last synced: 7 months ago
JSON representation
Rust Grpc Server and Client with MongoDB
- Host: GitHub
- URL: https://github.com/root27/rust-grpc
- Owner: root27
- Created: 2024-02-06T08:58:32.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-08T08:52:03.000Z (about 2 years ago)
- Last Synced: 2025-02-27T11:47:12.276Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rust Grpc Server
This repo contains grpc server and client using Rust and actix-web. It includes basic CRUD operations with MongoDB.
## How to run the server
```bash
cargo run --bin server
```
## How to run the client
```bash
cargo run --bin client
```
Client includes several APIs to communicate with grpc server.
### APIs
1. Create User
- Request
```json
{
"name": "John Doe",
"email": "test@test.com",
"password": "password",
"age": 25
}
```
- Response
```json
{
"message": "User created"
}
```
2. Get User
- Request
```json
{
"email": ""
}
```
- Response
```json
{
"name": "",
"email": "",
"age": ,
"message": "User found"
}
```
3. Update User
- Request
```json
{
"name": "",
"email": "",
"age":
}
```
- Response
```json
{
"message": "User updated successfully"
}
```
4. Delete User
- Request
```json
{
"email": ""
}
```
- Response
```json
{
"message": "User deleted"
}
```