What: Can NodeJS apps be distributed as binary? ie. you compile the .js app via V8 into its native binary, and distribute the binary to clients? (if you had total access to the NodeJS server)… or is minifying the code all you can do?
Why: We build serverside applications in NodeJS for clients, that have often to be hosted on the client’s servers. Distributing source code means clients can easily steal our solution and stop paying licensing fees. This opens up the possibility of easy reverse-engineering or reuse of our apps without our awareness.
Yes you can create a binary format. V8 allows you to pre-compile JavaScript. Note that this might have a bunch of weird side-effects on assumptions made by node core.
Just because you distribute the binary doesn’t protect you againsts theft. They can still steal the binary code or disassemble it. This is protection through obscurity which is no protection at all.
It’s better to give them a thin client app that talks to your server and keep your server code secure by not giving it away.