/ajaxHelloWorld

Simple app to demonstrate how to make AJAX calls.

Primary LanguageJavaScript

AJAX Calls With jQuery

This simple project demonstrates 2 AJAX functions. Clicking the buttons will fire the functions. One receives a response from a JSON file, and the other will re-direct to another URL, but an erroneous one. The responses will be displayed on the page.

There is a bonus game included. Move the explorer with the arrow keys (if it does not respond, click on the game). Grab the treasure chest and take it to each door to see the AJAX magic. Avoid the blobs!

Package and Dependency list

Package/Dependecy Description
express Fast, unopinionated, minimalist web framework for node. Used to setup server.
jQuery Fast, small, and feature-rich JavaScript library. It makes Ajax simpler.

1. Clone Repo.

2. Download Dependencies.

Open project's root folder in Terminal/Bash and run:

npm install

3. Start App:

In Terminal/Bash window use: node server.js To run the app.

4. View App in Browser:

Visit localhost:3009 to view the app.

File Structure

ajaxHelloWorld
├─ assets
│  ├─ ajaxRequest.js
│  ├─ hello.txt
│  ├─ info.json
│  └─ styles.css
├─ index.html
├─ readme.md
└─ server.js