-
Book Overview & Buying
-
Table Of Contents
Full-Stack Web Development with TypeScript 5
By :
In Chapter 4, we put together the endpoints we need for our chat app and got the basics of our backend in place with Hono, Bun, and TypeScript. Now, it’s time to make sure everything runs correctly.
First up, we’ll use Zod, which helps us to check whether an object corresponds to the schema we want it to be, to validate the data coming into our endpoints. This means checking that the data is in the correct format and follows the rules we set. Then, we’ll get to grips with Bun’s testing module. Learning how to use Bun’s testing module and Zod will give us the tools to make sure our app can be as reliable as it needs to be, and help us catch any issues early.
In this chapter, we are going to cover the following topics:
We will start by explaining why we actually need validation, what Zod is, and how to integrate and use...