8000 GitHub - kristifidani/rust_grpc_poc: Rust gRPC service PoC
[go: up one dir, main page]

Skip to content

kristifidani/rust_grpc_poc

Repository files navigation

Rust gRPC API PoC

Introduction

This project is a PoC to showcase the implementation of a gRPC API service with Rust. The movie services implements basic CRUD operation with unit-tests and integration tests.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Rust and Cargo installed. Check the official website.
  • Protocol Buffers compiler installed on the local machine. You can download it from the official GitHub repository.

Build and Run

  • Build the project: cargo build
  • Run the project: cargo run

Before running:

  • Run the PostgresDb container: docker-compose up -d
  • Make sure you have set the .env variables:
    DB_URL=postgres://postgres:postgres@localhost:5432/postgres

Testing

  • Run unit tests: make unit-tests
  • Run integration tests: make integration-tests

Alternatively you can execute some scripts:

  1. Navigate to the scripts directory: cd ./scripts
  2. Then you can execute the following scripts:
    • Fetch movies: bash fetch_movies.sh
    • Add movie: bash add_movie.sh
    • Edit movie: bash edit_movie.sh
    • Delete movie: bash delete_movie.sh

About

Rust gRPC service PoC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0