create-cloudflare
package, and lead you through setup. C3 will also install Wrangler in projects by default, which helps us testing and deploying the application.
Redis.fromEnv(env)
line in the code as UPSTASH_REDIS_REST_URL
and
UPSTASH_REDIS_REST_TOKEN
.UPSTASH_REDIS_REST_URL
and UPSTASH_REDIS_REST_TOKEN
to your wrangler.toml
as below.
npx wrangler dev
Deploy your function to Cloudflare with npx wrangler deploy
The endpoint of the function will be provided to you, once the deployment is done.