Skip to content

Step 8 - Hit routes via postman

Course: Blogging website - chapter 8

https://hono.dev/getting-started/cloudflare-workers#bindings

JWT_SECRET

DATABASE_URL

https://hono.dev/api/context#var

If you wan’t to get and set values on the context of the request, you can use c.get and c.set

You need to make typescript aware of the variables that you will be setting on the context.

💡 You can also create a middleware that sets prisma in the context so you don’t need to initialise it in the function body again and again