Skip to content

This project is a well-structured example of a Rust web application that provides basic functionalities of a data management system with a focus on thread safety and consistent API responses. It serves as a good foundation for expanding into more complex applications or for educational purposes to understand Rust and the Rocket framework.

License

Notifications You must be signed in to change notification settings

HanaHalitim/rocket_CRUD_simple_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Web Application with Rocket

This is a simple Rust-based web application that uses the Rocket framework to manage an in-memory database of records. It supports CRUD operations (Create, Read, Update, Delete) for records through a RESTful API.

Prerequisites

Setup

Clone the repository:

git clone [https url]

Switch to the nightly toolchain for this project:

rustup override set nightly

Build the project:

cargo build

Run the application:

cargo run

API Endpoints

GET /health: Checks the health of the application.

GET /records: Retrieves all records from the database.

POST /records: Adds a new record to the database.

PUT /records/: Updates an existing record by its ID.

DELETE /records/: Deletes a record by its ID.

About

This project is a well-structured example of a Rust web application that provides basic functionalities of a data management system with a focus on thread safety and consistent API responses. It serves as a good foundation for expanding into more complex applications or for educational purposes to understand Rust and the Rocket framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages