dead8309 / rocket-api

Trying rocket 🦀|| Rest apis with rocket framework and mongodb as datasource

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rocket-api

Experimenting with Rust and Rocket web framework. This is a simple REST Api that interacts with a MongoDB database to perform CRUD operations on a User model.

Endpoints

  • GET /users
  • GET /users/:id
  • POST /users
  • PUT /users/:id
  • DELETE /users/:id

How to run

Prerequisites

  • Rust
  • Cargo
  • Docker

Steps

  1. Clone the repository
git clone https://github.com/dead8309/rocket-api.git
  1. Start the mongodb container
docker compose up -d mongodb
  1. Start the api server
docker compose up -d rocketapi

About

Trying rocket 🦀|| Rest apis with rocket framework and mongodb as datasource


Languages

Language:Rust 95.5%Language:Dockerfile 4.5%