@upstash/ratelimit
and Serverless Framework.
npm i serverless -g
package.json
with @upstash/ratelimit
as a dependency:
UPSTASH_REDIS_REST_URL
and UPSTASH_REDIS_REST_TOKEN
into your .env
file.
handler.js
:
serverless.yml
to pass the environment variables: