January 2019
Beginner to intermediate
554 pages
13h 31m
English
We'll create a REST API server that allows you to store bookmarks and links to any blog or website that you wish to read later. We'll name our server linksnap. Let's create a new project by running cargo new linksnap. In this implementation, we won't be using a database for persistence for any link that is sent to our API, and will simply use an in-memory HashMap to store our entries. This means that every time our server restarts, all of the stored bookmarks will get removed. In Chapter 14, Interacting with Databases in Rust, we'll integrate a database with linksnap, which will allow us to persist bookmarks.
Under the linksnap/ directory, we have the following contents in Cargo.toml:
# linksnap/Cargo.toml ...
Read now
Unlock full access