简体   繁体   English

在本地运行节点是否不同于在Web服务器上安装节点?

[英]Does Running Node Locally Differ From Installing Node on the Web Server?

I'm wondering in principle how node.js works on a website that's running node code. 我原则上想知道node.js如何在运行节点代码的网站上工作。 I'm new to programming but I did manage to get node installed to practice with Angular and some Nodeschool stuff, however I don't think this is actually the whole story because the web server needs to have node and npm (maybe nvm) all installed in order to actually use any node code. 我是编程新手,但是我确实设法安装了节点,以便与Angular和一些Nodeschool一起练习,但是我认为这并不是全部,因为Web服务器需要所有节点和npm(也许是nvm)安装以便实际使用任何节点代码。 Or am I misunderstanding how node works? 还是我误解了节点的工作原理?

I guess I'm really looking for an understanding of the whole application of the node framework; 我想我真的是在寻找对节点框架的整个应用的理解。 what am I actually doing by running a practice program like the "Tour of Heros" Angular tutorial on my local machine, just testing it locally right? 通过在本地计算机上运行“英雄之旅” Angular教程之类的练习程序,然后在本地进行正确测试,我实际上在做什么? Because if I actually wanted it on my website I'd need to install node there and then run the framework on the server, from what I can gather... 因为如果我真的想在我的网站上安装它,我需要从那里收集节点,然后在服务器上运行该框架...

Thanks for your time! 谢谢你的时间! I hope I made my confusion clear enough. 我希望我的困惑已经足够清楚了。

Angular tutorial by Google "Tour of Heroes" Google的角度教程“英雄之旅”

Node and JavaScript are different. 节点和JavaScript不同。 Node provides a runtime environment enables JavaScript code to be executed outside browser. Node提供了一个运行时环境,使JavaScript代码可以在浏览器外部执行。 It provides various native libraries and event loop allowing main thread of execution to perform asynchronous operations. 它提供了各种本机库和事件循环,允许执行的主线程执行异步操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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