Mr.Possumz
high memory usage using compiled binary in docker
From what I've seen, Deno version 2 and up has a higher start up memory cost when run in Docker. I've seen similar numbers to what you're describing. They have eventually dropped a bit but the baseline is still several hundred mb higher than prior to Deno v2.0.0
15 replies
Deno env vars
are you calling
deno run
or deno task
to run the task from the deno file? If you're using the kysely CLI then it most likely expects to run in a node environment and you'd need to access to env variables as if you were in one for the sake of the migration. Alternatively, I was able to get Kysely migrations to work in Deno by just writing a migrator defined in their docs here: https://kysely.dev/docs/migrations#running-migrations10 replies
Deno, React, Next.js
Just to add to this, Fresh 2.0 is actively in dev and has had a few iterations of their alpha branch available: https://jsr.io/@fresh/core/versions
The release has been delayed because the Deno team is focusing on some upgrades to the Deno Deploy product that will pave the way for a few additional features they are aiming to include in Fresh 2.0
7 replies
Build an app with TanStack and Deno
@HudsyWudsy have you scaffolded the app directory as a Deno project? Typically that's done by calling
deno init <DIRECTORY>
. That should ask you a few questions and scaffold a basic Deno project, including adding a deno.json file. Once there's a deno.json file you should be able to call deno add jsr:@hono/hono
5 replies
Is there a way to use Javascript as easily as Php?
Try taking a look at https://fresh.deno.dev/, a web framework built specifically by the Deno team to run on Deno. It does run on deploy but can run in many other environments and I think it's server-side rendering is similar enough to PHP's that it should be easier for you to draw parallels
40 replies
Is there a way to use Javascript as easily as Php?
I think part of the issue here is that PHP has a more limited scope and obscures a lot of what's going on behind the scenes. It's designed with one purpose in mind and that is serving pages, with tooling aimed at making it very easy to do exactly that.
Deno, on the other hand, aims to be a viable option for a wider array of use cases. The result of that is the tooling and environment is more open ended. It can be (and very often is) used as a web server similar to PHP but it requires a little more effort to get off the ground. You'll need to research some of the JS frameworks and packages commonly used to accomplish this if you want to make the move.
40 replies
not sure why this code is erroring
If
Promise.all()
is expecting an iterable of promises, technically what you're returning is a composition of a promise and a chained statement. I don't often use Promise.all but I'm betting that fetchPage is generating the promise and passing the promise to the chained .then()
statement, which fails to destructure the name and videos variables.
You probably just need to declare the map callback as async to generate a promise.13 replies