简体   繁体   中英

How to actually deploy a node.js (or django) project on a hosted web server?

I know this question may seem stupid but I've been googling and asking this question for a while since I decided to start learning node.js. Ok so I have a hosted web server over at X10Hosting ( https://www.x10hosting.com/ ) and I'm wondering how I could host a simple node.js web app on it. Thanks, any help is GLADLY appreciated (an actual tutorial or documentation would be really help).

x10hosting's free hosting service is a shared hosting service, that means that you're allowed a folder inside a system shared by many users. That system has PHP5 and MySQL (as I read in their website), but Django and Node.js are a very different software stack. See, software stacks like Django or Node must be installed by the system administrator in order to serve content like a website. The administrator provided PHP5 and MySQL, but no Node or Python support. With a VPS, or Virtual Private Server, you are your own sysadmin, and free to install and configure whatever you want in your system, but it's not the case for shared hosting.

The Django Project website has a list , with some shared hosting or private hosting providers that support Django and some of them are free. For NodeJS you should checkout the Node Wiki's hosting list .

You can't deploy a NodeJS/Django in this type of server.

When you sign up for a free hosting plan in x10hosting, they give you a folder in their server. When a request come for you, Apache/nginx (which their are webserver) will execute the corresponding PHP file in your folder and will give to the client the output.

NodeJS is a very different type of installation. It have is own process which it will bind a port, handle and process the request, and give the client the output. So, you will need to install it on their server, but i don't think x10hosting will do that just for you. And Django work the same way.

Nodejitsu ( https://www.nodejitsu.com/pricing/ ), the "owner" of NodeJS can host your app for free if the application is open-source.

I hope this will help you ;)

If you want to deploy easily you can use Heroku, it's free if you use only one Dyno (You don't need more if you create a website with low traffic)

Heroku and the really good documentation (with article for django and nodejs) : Documentation

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