Leokuma
Leokuma
DDeno
Created by sachaw on 6/25/2024 in #help
Way too iterate over Deno.serve connections?
You can yield a WebSocket like this:
Deno.serve(req => {
const {socket, response} = Deno.upgradeWebSocket(req)
return response
})
Deno.serve(req => {
const {socket, response} = Deno.upgradeWebSocket(req)
return response
})
I hope it helps
4 replies
DDeno
Created by TangJieHao on 6/26/2024 in #help
command.spawn() stdin and stdout
If you want to consume the stream in a continuous way, I believe you'll have to either call pipeTo() or use an async iterator somewhere
9 replies
DDeno
Created by TangJieHao on 6/26/2024 in #help
command.spawn() stdin and stdout
Can you provide a reproducible example?
9 replies
DDeno
Created by coty on 6/27/2024 in #help
How to detect if executing on main thread vs worker
To type check a worker, add these lines at the top:
/// <reference no-default-lib="true" />
/// <reference lib="deno.worker" />
/// <reference no-default-lib="true" />
/// <reference lib="deno.worker" />
Source: https://docs.deno.com/runtime/manual/advanced/typescript/types#type-checking-web-workers
4 replies
DDeno
Created by Brandon Kalinowski on 6/14/2024 in #help
How to rewrite this: `import * as base32 from "jsr:@std/encoding@0.224.3/base32.ts";`
Deno team is really pushing JSR, but personally I would not say JSR is "better" than HTTPS. I'd say it depends on your use case and the way you like to work. There are tradeoffs
5 replies
DDeno
Created by cococore on 6/14/2024 in #help
deno_kv_oauth + hono how to fetch data from google profile: state, plans, method names changing.
That's beyond my knowledge 😔
13 replies
DDeno
Created by Brandon Kalinowski on 6/14/2024 in #help
How to rewrite this: `import * as base32 from "jsr:@std/encoding@0.224.3/base32.ts";`
From https://jsr.io/@std/encoding@0.224.3/doc/base32/~:
import * as base32 from "jsr:@std/encoding@0.224.3/base32"
import * as base32 from "jsr:@std/encoding@0.224.3/base32"
Exports are declared in deno.json: https://jsr.io/@std/encoding/0.224.3/deno.json
5 replies
DDeno
Created by cococore on 6/14/2024 in #help
deno_kv_oauth + hono how to fetch data from google profile: state, plans, method names changing.
Have you set up these env vars: GOOGLE_CLIENT_ID GOOGLE_CLIENT_SECRET ?
13 replies
DDeno
Created by Kay on 6/13/2024 in #help
Check if class instance is instance of provided type
Can you share the whole function code?
3 replies
DDeno
Created by shultz on 5/29/2024 in #help
preact/compat
@Deno AI Helper Hi deno's AI bot, do you know how to set up preact/compat in a Fresh project?
6 replies
DDeno
Created by shultz on 5/29/2024 in #help
preact/compat
@Deno AI Helper
6 replies
DDeno
Created by Asaf on 5/23/2024 in #help
Deno write large file
Sorry for my ignorance, but why is the TransformStream needed in this case?
8 replies
DDeno
Created by Xeonys on 5/21/2024 in #help
cannot execute: required file not found
Other people said the same. Weird. It works fine on my phone
12 replies
DDeno
Created by Xeonys on 5/21/2024 in #help
cannot execute: required file not found
12 replies
DDeno
Created by davecancode on 5/17/2024 in #help
How to import qstash into deno edge function?
8 replies
DDeno
Created by Jawad on 5/17/2024 in #help
How to use new FormData constructor in Deno server, I want to use it for my supabase edge function.
I think you will have better answers if you ask Supabase folks
3 replies
DDeno
Created by Phatso on 5/10/2024 in #help
Websockets API with async processing (is there a better way?)
The bottleneck could be the DB too. Some operations can lock tables, especially updates. And then other queries have to wait until they can be executed
12 replies
DDeno
Created by Phatso on 5/10/2024 in #help
Websockets API with async processing (is there a better way?)
I can't help much, but I suggest you limit the number of workers to the number of CPUs. You can get the number of CPU cores with navigator.hardwareConcurrency
12 replies
DDeno
Created by babakfp on 5/8/2024 in #help
How to delete all data of a `Deno.Kv` DB file?
In Deploy I don't know. But if you're running KV locally, you could just delete and recreate the DB file I probably haven't answered your question though
4 replies