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
.
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 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
- Run unit tests:
make unit-tests
- Run integration tests:
make integration-tests
Alternatively you can execute some scripts:
- Navigate to the scripts directory:
cd ./scripts
- 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
- Fetch movies: