Deno

D

Deno

Chat about Deno, a modern runtime for JavaScript and TypeScript.

Join

How can I create connections pool for postgres with denodb?

How can I create connections pool for postgres with denodb?

Fresh and MDX

What is most proper way of using mdx with freshfresh kanalına mesaj gönder

TTY vs console.log vs stdin and setRaw for dummies?

Hi all! Would someone be able to clear some things out with regards to deno inputs and outputs: - what exactly is one referring to, when talking about TTY? (in deno) is it just another name for console, or some of the std streams (stdin/stdout/stderr) - what about raw mode? there has been Deno.setRaw() but apparently removed in Deno 1.26. I think there was at some point a writer/reader/stream.setRaw() method or somesuch, but they maybe disappeared too. What is raw mode supposed to do, and can one enable it in the current Deno version somehow. - does deno do a lot of processing on console.log(stuff) versus writing raw bytes to std streams? What kind of processing, if any? And is the amount of processing the same whether deno is running on a windows terminal/vs code terminal, or as a child process of another deno process? ...

Is there an event that triggers when an Oak Deploy instance is closing?

I cannot find anything in the Deploy docs, specifically. But I see that the Oak app runs a callback when the server closes. Something like this should work, I think: ```ts app.listen({ port: 8080 }).then(() => {...

How to get my Deno nameserver accessible to the internet?

This is how it's setup: ``` const socket = Deno.listenDatagram({ hostname: "127.0.0.1", port: 53,...

How to debug why an island is working locally but not working when deployed?

I have an Island containing a select that changes the URL when a new item is selected. It is also disabled afterwards, since the "selected page" might need a bit time to load. When testing it locally everything works fine, but when pushing and it is deployed to deno deploy the select does nothing. The devtools also say that no event listener has been attached. The code that is being fetched looks correct. I added two console.log to see whether they are called on the client: first line in the Island and first line in the event handler. None of them reports to the browser console, so they are not executed on the client. I disabled all adblockers. How can I debug / understand what is going on?...

deps.ts & importMap.json

I a looking at system in ultra1 What determine what should go in importMap.json vs what sdhould go in deps.ts`...

OR interfaces?

What should EITHER mean? ``` interface ONE { one: number;...

`multipart` file upload streams

I'm trying to handle multipart forms and I am new to Deno and noticed that the MultipartReader mentioned in a few blog posts seems to be gone in newer versions of the standard library. Does that also mean that there is no way anymore to control memory usage with something like a maxMemory property? Because as far as I understand you are supposed to just use request.formData() which provides no way of handling this.

Is it possible to compile a project using `Deno.connectTlsalpnProtocols` (unstable API)?

error: Module not found
^ This is the error I get when I try to run my compiled program. Not sure if the unstable API is the issue or something else....

deno_runtime inspector service not starting...

Hi! I'm embedding deno_runtime, and I can't get the inspector working. I set BootstrapOptions.inspect to true, and WorkerOptions maybe_inspector_server and should_break_on_first_statement. The server is set to listen on 127.0.0.1:9229. server in inspector_server.rs is called, and prints
Debugger listening on ws://127.0.0.1:9229/ws/5b5725e4-ac19-4f4d-ba1b-f6d44ce9430f
Visit chrome://inspect to connect to the debugger.
Deno is waiting for debugger to connect.
Debugger listening on ws://127.0.0.1:9229/ws/5b5725e4-ac19-4f4d-ba1b-f6d44ce9430f
Visit chrome://inspect to connect to the debugger.
Deno is waiting for debugger to connect.
...

types not inferred from npm packages

im importing deepSignal an npm package with ts support however non of the returned types are inferred, i tested the same package in nodejs and it works there

drag and drop

Is there particular drag and drop library that the Deno community tends to use? something like draggable.js or react-beautiful-dnd ?...

Scraping Hackernews for Deno-related projects

Hello, I scraped Hackernews using Deno and Puppeteer, now how do I process the text to find keywords in each items? (ie. Front end, Back end, ..) Probably using a NLP library (hf?)...

Deno Deploy and Digital Ocean PostgreSQL DB...how on earth?

https://github.com/denoland/deno/issues/10312 So since the issue above seems to take quite some time to fix because it apparently involves several upstream software, is there anyway to fix the "other side"? What specifically is so special about (for example) Digital Ocean's ca certificates that they are completely unusable with Deno/Deno Deploy/rustls/webpki (whatever the latter two are). I assume this isn't the case with every other certificate issuer or service or host (sorry I don't understand a lot about this, it's all a bit complex). I assume people are successfully connecting to their databases on other services through Deno. What I mean, is there any point in asking Digital Ocean support if they can workaround this on their side? Are they even able to do that? Is there anything I can do locally? Does anybody know of an alternative route/service that works?...

vscode unable to resolve types

I'm testing npm integration, simple lodash example ``` // @deno-types="npm:@types/lodash" import lodash from "npm:lodash";...

Converting Typescript Types to JSON Schema (Props definition)?

Folks, We're creating a CMS solution using Deno and Fresh. For our product goals, we want to dynamically extract how UI components are configured using their Props declaration. Example: For this component...

What would the benefits for Deno + VueJS (for the frontend only) be?

So basicly using: deno run --allow-read --allow-write --allow-env npm:create-vite-extra@latest deno task dev And could this be used in deploy too? (for ssr)...

VScode Deno Extensions produces constant errors

I am currently using Deno with Opine in order to rewrite an API from JS to TS. While Opine only is used in one file, I chose Deno for the TS support and this I must have it enabled on all files in order to run(AFAIK). My issue comes with Deno constantly producing errors like the one pictured that I cannot find answers on how to solve. This pop up every few seconds making it extremely distracting, and as Errors their is no way to silence them even in VScode. I understand this means that deno features are not working and even after reinstalls they stop working after a little bit. Meaning I also loose functionality like hover and such ...