I want to use node.js in my next project, but my boss does not like that our competitors can read the source code.
Is there a way to protect the JavaScript code?
JXcore (node.js 0.11.X distro) has its own JX packaging feature that secure the source code and assets. You can even select whether that particular package can be used from other applications or not. (standalone OR library)
Let's say you have many JS etc. files and the entry point to your module is something like;
exports.doThis = function() { ...... };
if you simply call the method below and compile it to JX package, the source code will be safe.
jxcore.utils.hideMethod(exports.doThis);
this is (method hiding) would only required for the entry file since all the other sub JS files not reachable from the calling application.
You need JXcore to run JX packages.
More information is available from JXcore