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 AJAX Basics (retiring) AJAX Concepts How AJAX Works

Chaz Mabry
Chaz Mabry
7,839 Points

how would I set up a server on my computer to follow along withouth workspace?

how would I set up a server on my computer to follow along withouth workspace?

Are you on a Mac, Windows, or Linux machine? What type of server do you need? Rails or PHP?

3 Answers

Danny Gibas
Danny Gibas
3,138 Points

If you are on a Mac or Windows machine, the free basic version of MAMP will provide you with a local server for development. Very easy to set up.

Valerio Viperino
Valerio Viperino
6,947 Points

Your options would be (ordered from descending difficulty):

  1. Learn expressjs along with nodejs and code your own server, really is not hard as it seems!
  2. If you've got npm installed, you can install this simple package. Then you can open your terminal, cd into the directory you want to start your server by typing http-server
  3. If you're on a mac you've got Python installed, so you can cd into the directory you want and just type python -m SimpleHTTPServer 8000. That will open a new server on localhost:8000
  4. As Danny said, download and use MAMP
Duarte Monteiro
Duarte Monteiro
22,300 Points

If what you're looking is to have a server just for development, I recommend you looking into browsersync, you can also use together with gulp.js for automatic refresh as you develop you website.

PS. It also creates a local server where you can connect multiple devices and updates them all the same time.