I have a small website and have a free (shared) web hosting package but I have recently created a node.js app and I want to purchase a cheap vps with a different web host for it. The vps plan has limited storage so I will still be dependent on the shared hosting plan. It it even possible to do this? Let's say I have mywebsite.com using shared hosting and I want to host the specific page mywebsite.com/nodeapp on another web host with which I have purchased the vps. I can't seem to find this info anywhere and I would like to know before purchasing the vps. Thanks in advance for your answers.
here is a blog post ( not me ) You will need to use a sub domain like the guy above me said http://www.shoutmeloud.com/how-to-host-sub-domain-different-hosting-account.html Hope that helps
Think that ordinary shared hosting account would be good enough for your needs. There are some nice web hosts that don't oversell their shared network. What is your budget? I would also recommend you to choose the host with servers close to the target location of your audience. Good luck!
node.js is difficult on shared hosts as each customer will need a different port to run the node.js process and there is no way to ensure that the node.js process stays up. I find it hard to believe, however, that a VPS plan would be so short of disk space that you will rely on a FREE shared hosting account? Can you describe the specs of the hosting and budget you have? Usually, if your want to have:- yourdomain.com on one server and yourdomain.com/directory on another server your web server would have to proxy the directory to the other web server, or you would have a load balancer like an F5 (Big IP) with irules performing the real-time rewrite and proxy to do this. A load balancer is clearly outside the budget of the OP, which is why I ask for the spec required above, and budget, so I can be more creative with my solutions.
The shared hosting plan I that I have is not actually free, it is a paid service but I got it free for one year as an extra from doing an online web development course. Also, I have no idea how much space I will get from the VPS but I assume it will be very limited since I intend to choose the cheapest plan available. I am only using it for testing purposes so I wish to spend as little as possible. It seems I will have to go with using a sub domain to host the node.js apps.
Yeah... Unless you have a very large existing website, most VPSes give you at least 1GB of space, usually at least 5GB - which should be more than enough for both hosting an app and the website itself. Depending on the setup, you might also be able to set up anything you want, including node.js and whatever you want. I would, personally, just move everything to the VPS, and avoid having to run two servers. Also, if the "free" hosting is just free for a year, you'll still start having to pay for it after that year runs out, don't you?