Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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)?

say I have a basic website www.url.com/index.php (note: I'm using PHP also). 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? do I just upload a node.js file into the web hosting also?

In all the examples, they are using localhost with port 8000 or something. Can someone shine some light?

Thanks!

like image 738
hellomello Avatar asked Nov 03 '22 16:11

hellomello


2 Answers

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.

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..

from nodejs.org
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. 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.

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..
some usefull links
Domain API
ExpressJS
ExpressJS examples

like image 72
Gntem Avatar answered Nov 09 '22 06:11

Gntem


Here is something i came cross.

Hosting your node app?

Hosting Node Apps

nodeFu

Supported hosting providers?

Node Hosting

just read the descriptions for each section.

like image 40
Mithun Satheesh Avatar answered Nov 09 '22 05:11

Mithun Satheesh