lcameroon / coding-challenge

Coding Challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple JSON API

Installation

To get this server up and running, do the following:

  • Install Node
  • Type $ npm install the first time to get the server's dependencies
  • Type $ node app.js to start the server
  • Go to http://localhost:5000 in your browser

Testing the API using cURL

If you want to test your API before using it in a client application, you can use the demo page:

http://localhost:5000

Post some JSON data to filter:

curl -i -X POST -H 'Content-Type: application/json' -d '{ "payload": [ { "drm": true, "episodeCount": 3, "image": { "showImage": "http://catchup.ninemsn.com.au/img/jump-in/shows/16KidsandCounting1280.jpg" }, "slug": "show/16kidsandcounting", "title": "16 Kids and Counting" } ] }' http://0.0.0.0:5000/

Mocha

  • Type $ npm install -g mocha to Mocha test framework
  • Go to test folder $ cd test
  • Running mocha's tests $ mocha

About

Coding Challenge

License:MIT License


Languages

Language:JavaScript 99.6%Language:PHP 0.4%