简体   繁体   English

Node.JS的基础知识?

[英]Basic knowledge for Node.JS?

I'm trying to learn about node.js and there are tons of examples out there, but one question that I can't find an answer to or example is how does this work with web hosts (i'm using inmotionhosting.com)? 我正在尝试了解node.js,并且有很多例子,但是我找不到答案或示例的一个问题是如何使用web主机(我正在使用inmotionhosting.com) ?

say I have a basic website www.url.com/index.php (note: I'm using PHP also). 说我有一个基本网站www.url.com/index.php(注意:我也使用PHP)。 For this website to work, all I have to do is upload a file into my file manager in my web hosting site. 要使这个网站正常工作,我所要做的就是将文件上传到我的网站托管网站的文件管理器中。

How does node.js work? node.js如何工作? do I just upload a node.js file into the web hosting also? 我只是将node.js文件上传到网络托管中吗?

In all the examples, they are using localhost with port 8000 or something. 在所有示例中,他们使用localhost和端口8000或其他东西。 Can someone shine some light? 有人能发光吗?

Thanks! 谢谢!

you will need at least VPS hosting to install node.js, shared hosting won't allow you to install any application on your own, unless you they give you the option to do it. 你至少需要VPS托管来安装node.js,共享托管不允许你自己安装任何应用程序,除非你给他们选择这样做。

then it all depends on how you have configured and what application is node.js serving, you can't really say where to upload files by default unless a path is set either from you or from webhosting.. 然后这一切都取决于你如何配置和node.js服务的应用程序,你不能真正说明默认情况下上传文件的位置,除非从你或webhosting设置路径..

from nodejs.org 来自nodejs.org
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js是一个基于Chrome JavaScript运行时的平台,可轻松构建快速,可扩展的网络应用程序。 Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. Node.js使用事件驱动的非阻塞I / O模型,使其轻量级和高效,非常适合在分布式设备上运行的数据密集型实时应用程序。

it doesn't say it specific for web use, instead you should use a web framework such as ExpressJS where you can build you web application or any other stuff.. your host should provide further information on how to manage packages in your nodejs instance, configuration, etc.. 它没有说明它特定于Web使用,而是你应该使用一个Web框架,如ExpressJS ,你可以在其中构建你的web应用程序或任何其他东西..你的主机应该提供有关如何在nodejs实例中管理包的更多信息,配置等。
some usefull links 一些有用的链接
Domain API 域API
ExpressJS ExpressJS
ExpressJS examples ExpressJS的例子

Here is something i came cross. 这是我遇到的东西。

Hosting your node app? 托管您的节点应用程序?

Hosting Node Apps 托管节点应用程序

nodeFu nodeFu

Supported hosting providers? 支持托管提供商?

Node Hosting 节点托管

just read the descriptions for each section. 只需阅读每个部分的说明。

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

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