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

Matthew Gadsden
Matthew Gadsden
2,654 Points

Local Host!

I have just restarted learning code (I started for a week and now I'm just starting again) and while doing the java script deep dives i noticed the teacher using a localhost website and was wondering how to set one up for me to test my coding

2 Answers

Really good tutorial here about setting up and using Xampp: XAMPP Setup They go through it in one of the PHP tutorials (Which I'd recommend as they're brilliant) This gist of it is to install XAMPP, then start working out of the C:\xampp\htdocs directory Opening a web browser and browsing to localhost then loads your web page! Advantage is that it runs the same as on a web server! Hope it helps!

Matthew Gadsden
Matthew Gadsden
2,654 Points

is this for windows, mac or both?

-Thanks for the help

James Barnett
James Barnett
39,199 Points

Is there any particular goal you are trying to accomplish?

You need local web server if you are developing with a backend language like PHP or Ruby. You don't need it if you are working with a front-end language like JavaScript.

However if you want to play around a local web server like XAMPP for your JavaScript project you certainly can.