Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Express Basics (2015) Using Templates with Express What is Template Rendering?

does node live on the server or the client?

I understand that javascript is on the client and php etc is on the server, but node is a server too, but is that on the client acting as a server or is it on the server? does that mean you can write to the server??

4 Answers

Jesus Mendoza
Jesus Mendoza
23,288 Points

Node is Chrome's JavaScript V8 engine (which is the engine that executes JavaScript in Google Chrome) taken out of the browser (along with other libraries) so you can run JavaScript on the server. So yes, it runs on the server.

I will use heroku to deploy my app - there is a workshop here on treehouse on how to do it!

so if i publish a site, the server that hosts my site MUST have node installed on it for my site/app to work?

Yes ?; If you use NodeJS for powering your site of course.

Kevin Korte
Kevin Korte
28,148 Points

Correct, or if it's an empty box like on Digital Ocean or AWS you'll have to install NodeJS yourself first.

I mean if I publish a site on the interwebs with like go-daddy or 1to1 or 123reg etc, will the site work?

rydavim
rydavim
18,813 Points

I don't have experience with GoDaddy, but I suspect that you won't be able to run standard Node.js on GoDaddy's normal hosting. You could try something like CGI-Node.js for that, or you could do it yourself with Node.js on something like Digital Ocean.

Edit: Running a low-traffic droplet on Digital Ocean will run about $5/mo. If you're interested in trying it, you can use this link to get $10 to start off. Disclaimer: That is a referral link, so I stand to get something if you decided to stick with DO. That being said, having used them for a year I've never had anything to complain about, and their customer service is fantastic.

Jesus Mendoza
Jesus Mendoza
23,288 Points

You can't host Node.js applications in normal hosts like GoDaddy, 1&1 or 123reg. You need more advanced hosting services that give you access to the enviroment and console so you can configure it to host your app.