Skip to content

rafaeldnferreira/learning-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust sample web server

This application was built on top of the last chapter of the learning rust book.

Once this application starts it will fetch from Yahoo finance quote price information for stocks with symbols defined at symbols.txt.

Practiced learning concepts

  • Generics
  • Structs
  • Pattern matching
  • Third party crates
  • Unit tests
  • Module separation
  • Sharing context among threads (HashMap)

Environment setup

Ensure openssl dev headers are available:

$ sudo apt-get install libssl-dev

Run it with cargo run

Issue a GET request to retrieve the available symbols:

$ curl -XGET http://127.0.0.1:7878/api/v1/quotes

Use one of the symbos and issue a second request:

$ curl -XGET http://127.0.0.1:7878/api/v1/quotes/MSFT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages