For an usual NodeJS instance, we can start it by node server.js
. The problem with this is that, in a production server, when a hacker compromises my machine they will be able to view and copy all of my server-side source code. This is a big risk, since the source code contains intellectual property. Is there a way to prevent it from happening?
For example, in Java, code is usually built into jar
package or .class
files and we only deploy the built file. When a hacker compromises the machine, they can only see the jar
or .class
file which is only byte code and not understandable.
I have a similar concern on my Python Flask server.