简体   繁体   中英

If Node.js is server side then is it not visible to the client?

I undesrand that Node.js is a server side (implementation?) of JavaScript. Server side means executes on the server (like say PHP or Python). Does that mean the code you write in JavaScript in Node is "invisible" (to the client)? I'm not quiet keen on server side stuff and this subject interests me. So say, you write something really super simple such as console.log("Hello World"); then that gets executed on the server and doesn't get shown to the client (like View Source, etc.)? Am I right?

I'm asking this here to seek an easier (small) explanation of the idea. Also, is this possibly something I'm looking for?

Yes, Node.js code runs completely on the server (just like python). In your link the goal is to encrypt the source code because a client has access to the servers filesystem. To communicate with the client you will need another component like the http module .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM