So nwjs is a neat little framework that enables node apps to run in desktop mode independent to platform. But the way I package my files is pretty raw.
I zip my node app directory into a .nw file, and I copy it to an existing nwjs app's content folder. Then this means that anyone with some knowledge of nwjs will be able to literally unzip the .nw file and dig through the app directory. WTF. Is there a way to protect my files in my nwjs app?
You can compile the javascript files with snapshot:
nwjc source.js binary.bin
then load the compiled js in your app like this
require('nw.gui').Window.get().evalNWBin(null, 'binary.bin');
for more info, check this out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With