Ratelimiting
Hono
Ratelimiting endpoints with Hono
Prerequisites
- Created your Unkey account
- Created an Unkey root key with
ratelimit.*.create_namespace
andratelimit.*.limit
permissions.
1
Create Hono Application
Run the following command to create your Hono project
2
Install
Now install the @unkey/ratelimit
package
3
Add Root Key to env
Add your root key to your .env
file
4
Update index to use our Hono SDK
Create a new route and add the following code
/src/index.ts
5
Running it
6
Try it out
You will need to curl a few times to see the ratelimiting error. Once you do, you, you will need to wait to perform the action again.
What is next?
Now that you’ve seen the power of Unkey, check out some resources below to continue your journey.
Was this page helpful?