Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 this because there is no clustering available so you kind of have to run it on single core machines to get maximum performance out of your hardware. In other words, on cloud solutions like Deno deploy or a Kubernetes cluster configured to run it on single cpu docker containers.

I am not interested in that and as long as it is that way, running Deno is unfortunately a waste of my hardware. Sure there are web workers and they are great for stuff but if my process dies for some reason I don't want that to halt the application.



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?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: