Skip to content

kenanjasim/example-rust-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example HTTP api written in Rust

This is a simple example of a HTTP api written in Rust using the warp crate.

Running

The server can be run with the following command:

cargo run

...

Running example server on localhost:3030

Endpoints

The example provides a very simple endpoint that returns a JSON response:

curl localhost:3030/todos/1

{"id":1,"title":"Example todo","completed":false}

Testing

The example provides a simple test suite that can be run with the following command:

cargo test

If you want coverage information, you can run the following command (assuming you have cargo-llvm-cov):

cargo llvm-cov

About

This is a simple example of a HTTP api written in Rust using the warp crate.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages