Samuel
Samuel
DDeno
Created by Samuel on 1/15/2025 in #help
Is Deno a good JS runtime for embedding into another application?
Hi, I am looking for a Js runtime that I could easily embed into my application. I would like to allow scripting for the users of my application to extend its capabilities. The reason I am considering Deno is because of its security features. Is Deno a good candidate for this? Where can I find some docs on how to do this?
2 replies
DDeno
Created by Samuel on 5/1/2023 in #help
Reading a ReadabeStream without consuming it?
Hi, I'm trying to migrate an HTTP/HTTPS proxy protocol server from Node.js to Deno. The proxy listens for TCP connections, and I need to handle HTTP and HTTPS connections differently, so the first think I do is to read the first byte of every new connection to determine if it starts with "22" (which means that it is a TLS handshake). If it is a TLS handshake I handle that one way, else i just pass it to an HTTP parser. The problem is that If i read the first byte then I cant pass the connection to Deno.serveHttp (?) because the first chunk was consumed already. Is it possible to "peek" into a Deno.Conn / ReadableStream without consuming it, so that the Conn instance can be used elsewhere?
4 replies