Skip to content

backend of classified website written in rust, rocket framework and mangodb

License

Notifications You must be signed in to change notification settings

jamal-khey/annonces-backend

Repository files navigation

rust backend with rocket and mangodb

CI

Fully working CRUD REST API using

  • Rust (stable)
  • Rocket.rs
  • mongodb
  • okapi

🚀 Features

  • Establish MongoDB connection using rocket Adhoc fairing.
  • Custom error handlings with rocket Responder and okapi OpenApiGenerator.
  • CORS fairing and Counter fairing to demonstrate how fairing works.
  • Request guard using ApiKey.
  • Implement Open API documentation using okapi.
  • Test codes to test API endpoints.

deploy

setup.sh

to the ploy the projet on production

deploy-rust.sh

on the remote server to install the dependencies (rust compiler ..) to zip the code sources , copy it to the server , compile and run

🔧 Building and Testing

See Makefile for all commands

developpement mode

make dev

debug mode

cargo run

release mode

cargo build --release && cargo run --release

unit testing

cargo test


ℹ️ You should create your own .env file including MONGO_URI, MONGO_DB_NAME, and API_KEY to run it.

About

backend of classified website written in rust, rocket framework and mangodb

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published