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

Where should I put node.js code?

I sorta need the big picture.

I bought a web host and a domain. I used to upload static html and css to it to make a entry-level website. Now that I've learnt node.js to create a responsive website(createServer()). I am wondering how does node.js fit in this big picture? Should I sign in my server management system and put the code there since it is "server side programming"?

2 Answers

jason chan
jason chan
31,009 Points

You push your code up with git and heroku toolbelt. Heroku has a free teir. Plus it's easy to set up.

Easy way to deploy node app is with heroku. https://devcenter.heroku.com/articles/getting-started-with-nodejs#introduction

Digital ocean is alternative https://www.digitalocean.com/community/tutorials/how-to-install-a-mean-js-stack-on-an-ubuntu-14-04-server

Rich Zimmerman
Rich Zimmerman
24,063 Points

You'll need a web hosting provider that either has NodeJS installed on the back end or gives you access to your directory.. like AWS gives you an option to start up a server with ubuntu, you SSH into the IP address and install node and all your modules you might use through the SSH connection.

Here is a detailed instructional video for that specific scenario so you have an idea.. https://www.youtube.com/watch?v=WxhFq64FQzA