CoombaPace / helloWorld

A node.js module that will respond to a browser request with “hello world” and error in a JSON response.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AJAX Calls With jQuery

This simple project demonstrates 2 AJAX functionsthat fire on button click. One receives a raw response from a JSON file, the other will re-direct to another URL (an erroneous one). The responses will be displayed on the page in JSON format.

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

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

About

A node.js module that will respond to a browser request with “hello world” and error in a JSON response.


Languages

Language:JavaScript 56.3%Language:HTML 39.5%Language:CSS 4.2%