Yes, since javascript functions show their source when they are toStringed, the source needs to be kept in memory, even in snapshots.
I will say if you're building a custom binary anyway, why not put the sensitive parts in a C++ addon and require that from the JavaScript? Reverse engineering On Thu, Feb 23, 2012 at 10:28 AM, Rob Ashton <[email protected]>wrote: > I thought snapshots also included the source code - at least that was my > understanding from a previous thread on the same matter? > > > On Thu, Feb 23, 2012 at 5:27 PM, Ben Noordhuis <[email protected]> wrote: > >> On Thu, Feb 23, 2012 at 16:56, Jeremy Rudd <[email protected]> >> wrote: >> > 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 our >> clients? ... >> > 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. >> > >> > Shamelessly cross posted >> > on: >> http://stackoverflow.com/questions/9413123/secure-distribution-of-nodejs-applications >> >> [Insert obligatory "get better clients" comment here.] :-) >> >> V8 has a feature called snapshotting where it loads JS and spits out >> machine code. V8 uses it to improve start-up times but maybe you can >> reuse it for your purposes. >> >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
