Live data from Hacker News

Deno.js in production

medium.com

91–100 of 100 posts

Re: Deno.js in production

#91
post #67

I haven't had the same success with Deno that I expected. At first, I was shocked by how good the tooling is, and I was super happy with its dependency management. All of the problems started once I started getting into actual business logic. `redis` and `ioredis` `npm` packages don't work with Deno, even with the Node compat layer (I tried). So you have to use the Deno driver for Redis. But you look up the library f…

>Same deal with Postgres. `pg` would not compile at all. Knex also didn't work (this was an older project).

You should take a look at Postgres.js [0] which supports Deno and TypeScript. Version 3.x was released recently and discussed in this HN thread [1].

The client is implemented in JavaScript. Queries can be written using JavaScript template literals.

[0] https://github.com/porsager/postgres [1] https://news.ycombinator.com/item?id=30794332

Re: Deno.js in production

#92

I hoped this article would provide more info than it actually did. For me, a javascript developer that mainly use Node.js for work, Deno is interesting and I want to use it but the hosting part is what prohibits me from using it. In node it's easy to run production code with pm2, you can cluster it and it's super easy to configure it so that it will run one node process per available core. With Deno, you can't do thi…

You can totally use pm2 with Deno! Just needs an extra flag. pm2 start index.ts --interpreter="deno" --interpreter-args="run --allow-net --allow-write"

Ok I had no idea that was possible. Will this work with the cluster module in pm2? How does it work exactly? Does pm2 have its own webserver and just forwards the request to whatever interpreter you specify?

Re: Deno.js in production

#93
post #45

Earlier quoted context omitted.

Deno is No|de swapped. So no, not backwards. But... how would one call it?

French has a word for this: https://en.wikipedia.org/wiki/Verlan Verlan is itself verlan of l’envers (backwards). It’s super common to make slang words this way.

TIL that Stromae (the name of a Belgian musician) is Maestro in verlan.

Re: Deno.js in production

#95
post #6

Earlier quoted context omitted.

You're about to run their software on your computer-- what's the difference with that and running their install script?

How do you guarantee that their install script is non-malicous and was actually provided by them? There's a reason why code signing exists as a security measure.

Most people trust that the script is not malicious, including me. There is wrong with this approach, it is extremely convienient to try something out that has good reputation.

For these people, running the script or downloading a signed GitHub release is equivilent, in both cases they do not read the source code of the software that they are running.

There is nothing stopping you from 1) reading the script before running it 2) reading the source code of Deno and any dependencies 3) compiling from source yourself. For most people, this is a waste of time. Trust has to start somewhere to build something great.

Re: Deno.js in production

#96
post #94

Earlier quoted context omitted.

Sorting the letters by alphabetical order in "node" by converting each letter to its own string in an array. Slick JavaScript, basically.

yeah but you need to call sort as a function

OP code would throw an exception. ^^

Re: Deno.js in production

#97
post #64

node.js nowadays is a total disaster. I've been able to hold down the fort with turbo repo, but even then it's been a touchy strategy. I want to switch to Deno, and I'm interested in articles like this. Either that, or, because of the state of nodejs/NPM modules, and it's ever-increasing surface area of doom and resume driven development node modules, either somehow switch to deno or go back to just HTML and vanilla…

> resume driven development node modules

Hahahah!!! So true!! ;D .. i think i've written a couple of those!

Re: Deno.js in production

#98
post #64

node.js nowadays is a total disaster. I've been able to hold down the fort with turbo repo, but even then it's been a touchy strategy. I want to switch to Deno, and I'm interested in articles like this. Either that, or, because of the state of nodejs/NPM modules, and it's ever-increasing surface area of doom and resume driven development node modules, either somehow switch to deno or go back to just HTML and vanilla…

> resume driven development node modules Hahahah!!! So true!! ;D .. i think i've written a couple of those!

No post body was provided.

Re: Deno.js in production

#99
post #67

I haven't had the same success with Deno that I expected. At first, I was shocked by how good the tooling is, and I was super happy with its dependency management. All of the problems started once I started getting into actual business logic. `redis` and `ioredis` `npm` packages don't work with Deno, even with the Node compat layer (I tried). So you have to use the Deno driver for Redis. But you look up the library f…

ioredis and mysql2 have been working for some quite sometime.
Post reply on HN