Skip to content

arealesramirez/rust-rest-api-hyper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust API Using Hyper

This is an example of how to build a Rust API using Hyper with Tokio, to generate a simple API containing the following endpoints

  • GET /cars = to fetch all cars
  • GET /cars/:id = to fetch a specific car
  • POST /cars = to create a new car

The car records are not stored in a database but rather in memory as the main reason of this project is for explanation purposes. If you need a thorough explanation, check out the article https://www.becomebetterprogrammer.com/rust-api-using-hyper/.

Requirements

This example codebase uses Rust programming langauge. Hence, you must have Rust properly installed in your machine if you want to run the code.

Refer to https://www.rust-lang.org/tools/install to setup Rust in your local machine.

Do you want to run the code?

Clone this repo to your local machine. Open the terminal and run the command cargo run command.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages