Hacker News new | ask | show | jobs
by LAC-Tech 1255 days ago
Huh? To run a node application, you need node installed on the container, as well as the JS files. Is that a big deal?
2 comments

You don't even need that: https://github.com/vercel/pkg.

I think there are equivalents in the Python ecosystem.

I have used PyInstaller for this before, which has the major caveat of it not being a cross-platform solution. You can only build binaries for the platform you're currently on. However, you can work around this by configuring GitHub Actions to build binaries for you for Windows, macOS (x86) and Linux.
Yes, because now I need to install node, probably run npm install, etc…
there's no npm install and there's no etc.

All the files needed to run a node application are in node_modules. If node is on the container, you can just rsync the scripts.

I think you're comparing distributing stand alone binaries, vs distributing the source code for a node app, and then installing its dependencies, and maybe doing some transpiling. That's not a fair comparison.