Closed thorwebdev closed 1 year ago
My code is here in case helpful: https://github.com/thorwebdev/edgy-edge-functions/pull/2
Thanks @thorwebdev I'm taking a look
@thorwebdev
import x from "https://esm.sh/@upstash/ratelimit"
import { Redis } from "https://deno.land/x/upstash_redis/mod.ts"
const r = new x["Ratelimit"]({
redis: Redis.fromEnv()
limiter: x["Ratelimit"].fixedWindow(10, "10 s")
})
console.log(await r.limit("test"))
here's the hack to unblock you I'm going to dig deeper to see why it broke
Can confirm that the workaround works for me, thanks 👍
A less hacky way is this, I have absolutely no idea why esm.sh doesn't work
import { Ratelimit } from "https://cdn.skypack.dev/@upstash/ratelimit@latest"
I'll update our docs with this while we're still waiting for native npm:@upstash/ratelimit
support in deno deploy
Trying to use as per docs
I'm getting
When using esm.sh
I get
Any ideas?