Link to home
Start Free TrialLog in
Avatar of Refael
RefaelFlag for United States of America

asked on

Node.js shared hosting server

Hello Experts,

It might be the most silly question. I am on my first step learning Node.js.
The first step explained is how to install Node.js on my local machine (Mac OS X) which is fine for development and testing.
What about production? Am i able to install Node.js on my client's shared hosting server e.g. "Host Europe"?
That's bedside all the other scripts involved and required such as RESTful web services and Express?

I am wondering if that's possible and if it is possible, I am sure somehow it is, then how complex it is and what is needed to achieve that?

Would be thankful to get a professional answer :-)
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

It is unlikely that you will be allowed to install 'node.js' on a shared server.  Installing 'node.js' requires 'root' access which would give you access to everyone's files.  Your hosting company will probably refuse to allow you to do that.
Avatar of Refael

ASKER

Hello Dave, Thank you.
So if I develop a website for a client with Node.js and Express and that client host his website on a shared hosting such as godaddy and hosteurope that means that it is impossible? and everyone else that develop a website with this scripts need to have a dedicated hosting server? are you sure?
Avatar of noci
noci

@Dave it depends on the hosting provider...

@Rafael:
Perl, python, php are also tools that are used just like node.js.
So if they allow perl/php maybe your hoster will install node.js for you....
so it can be used.  If the shared hosting is done using docker it might well be contained to "your container"...

So first ask your Shared hosting provider.
Avatar of Refael

ASKER

noci thank you for clearing this up...

Not knowing these facts i think that Node.js would not be something I will learn at this point.
Most of clients simply give me their hosting login info and most of them just have a fairly basic hosting package on GoDaddy and similar usually with with PHP and mySQL.

I am wondering :-(
ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Refael

ASKER

So... I think that before I will ask my clients to move to a dedicated hosting server i should post it to make an influence :-) So I understand that all who uses Node.js  have clients on dedicated hosting services. Gooood to know.
....
I disagree.  While installing PHP does require root access, using it does not.  Node.js requires root access for both installing and using it as far as I can tell.  Yes, I have installed it on this machine just for a test.

I have running a node.js service without root access... Starting the server may need root access running it not necessarily.
Just like php-fpm. (Fastcgi access for fpm) which runs as a service. It starts as root, and later drops privileges.

Just be sure that you don't need a privileged port (ie. tcp / udp port <1024).
I can agree on that maybe some special precautions that are common elsewere are still needed.
Maybe look at sandstorm.io a very interesting environment built on meteor (& thus node.js).
It starts as root (and the master process & mongo database are running as root, but the user process (it's payload) isn't.)