Part 2 Getting started

 

This second part of the book covers the business logic and sets up a working web application with various API endpoints. It covers database access, logging, and accessing third-party APIs. We will also clean up after ourselves and split our application into modules. After reading this part, you’ll know what your day-to-day will look like developing Rust web applications, and where to look for additional information.

Chapter 3 sets up our first route handler and HTTP GET endpoint. You’ll become familiar with the web framework, Warp, and how to funnel an incoming HTTP request to our route handler, how to send back a proper HTTP response, and what to do in case of an error.

Chapter 4 expands on these topics and implements the POST, PUT and DELETE endpoints for our API. You’ll learn to accept parameters, parse JSON, and fill in-memory storage with our questions and answers.

After writing so much business logic, it is time to clean up. Chapter 5 details the Rust module system. You’ll learn to determine if and when to create sub-crates, or just split logic into its own modules so you can access them throughout your application.

Running web services can fail, users might report problems and bugs will be found. Inspecting has a high priority when developing and running applications in production. Chapter 6 will make sure you have all the tools and skills needed to implement logging, tracing asynchronous behavior and debug your application locally.