Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Setup Your Local Development Environment

i think this may sound like a stupid question but ...

sorry for asking this but i was brought to this workshop because i am following the ajax course in the front end track. and it was talking about local web server. i want to try test out some of my ajax on a web server. i sort of find this recommendation. however i barely know anything about php. i use html files. can i not use html files? should i use something else instead of mamp? or have i got this all wrong?

1 Answer

Brendan Whiting
.a{fill-rule:evenodd;}techdegree seal-36
Brendan Whiting
Front End Web Development Techdegree Graduate 84,696 Points

You can use JavaScript to run a server. Here are some courses I recommend here on Treehouse:

Node.js Basics

Express Basics

REST APIs with Express

There's a whole Full Stack JavaScript track, although it's a little bit out of date at the moment.

For the time being, however, it might be better to practice AJAX with existing APIs on the internet. Here are a couple options, but there are many:

Random User

Star Wars

You can make AJAX requests from your front end to one of these web APIs to practice, without having to worry about building your server for now.

One other thing. If it wasn't mentioned already, I highly recommend getting familiar with the Postman tool. You can test out your interactions with a server (a local server or an external server), test your requests, look at the responses in a nice GUI, and isolated to just this piece of the puzzle without worrying about all the front end logic around the request.

thank you