No way to create a desktop app using node.js without showing the code?

liladhen

Regular Member
Joined
Apr 1, 2022
Messages
218
Reaction score
67
I'm rebuilding an automation of mine in nodejs and I intended to use electron but it leaves the source code exposed, is there any package to create apps without these security problems? (the application will be made available to other people so the concern)
 
I'm rebuilding an automation of mine in nodejs and I intended to use electron but it leaves the source code exposed, is there any package to create apps without these security problems? (the application will be made available to other people so the concern)
Node is not made for this. Best you can do is minify and obsucate and then package the app with asar.

Otherwise they're just scripts. If someone is willing to spend time to reverse engineer obsucation, they would as well reverse engineer any compiled code too.
 
Node is not made for this. Best you can do is minify and obsucate and then package the app with asar.

Otherwise they're just scripts. If someone is willing to spend time to reverse engineer obsucation, they would as well reverse engineer any compiled code too.
Thanks, the currently app is coded in python but so many users having errors and i like node for do it again, i will try obfuscate the code and use asar to make it more secure.
 
Several packages and tools are available for creating secure desktop applications with Node.js, including NW.js and EncloseJS. These frameworks provide features for securing your application's source code, such as encryption and obfuscation, to help protect against unauthorized access and modification.
 
you can use pkg to create a .exe from your node js project (cross platform so can make executable for mac os or unix )
 
you can use pkg to create a .exe from your node js project (cross platform so can make executable for mac os or unix )
Several packages and tools are available for creating secure desktop applications with Node.js, including NW.js and EncloseJS. These frameworks provide features for securing your application's source code, such as encryption and obfuscation, to help protect against unauthorized access and modification.
I will use pkg, bytenode and obfuscate the code, thanks for the tips
 
I will use pkg, bytenode and obfuscate the code, thanks for the tips
Not sure u need to obfuscate te code, the pkg create an executable without sources dont know what it looks like after a reverse eginneering...
 
Not sure u need to obfuscate te code, the pkg create an executable without sources dont know what it looks like after a reverse eginneering...
Opening the executable from pkg in vscode is possible to view the js code, Is it possible to improve this?
 
Opening the executable from pkg in vscode is possible to view the js code, Is it possible to improve this?
effectively if you open the generated .exe in hex editor you see the code so obfuscate te code,?
but maybe with something "homemade"
 
I dont know if we can really hide our code to motivated "hackers" / even obfuscated with time we can decode the source but there is a cost.
The best way to secure our code should be to seperate the "core/sensible" code from the app and create an api wich will be called by the app.
So the real code of the api will be outside the client scope.

If your client is not a "geek" or dont look to be kind of guys looking to screw everyone, obfuscate / encryption et pkg should be enough.
 
Like others have said, making an executable would be the fastest/easiest solution.

The most secure way would be to host your application on a server and have the client communicate with it using an api.
 
Back
Top