3 1. install [node.js](http://nodejs.org/download/)
4 2. install [git](http://git-scm.com/). __Make sure to select the option to add git into $PATH__
5 3. install dependencies [express,cors] npm install express, npm install cors
9 # Create the server file
12 #############################################
13 ar express = require('express');
14 var mockUris = require('../configurations/mock.json');
15 var cors = require('cors');
20 // declare server cross browser
23 methods: 'GET, POST, PUT, DELETE',
24 allowedHeaders: 'Content-Type,Authorization,If-Modified-Since'
27 /******************************************* MOCKS ENPOINTS *************************************************/
29 app.get('/v1' + mockUris.generalConf.getPoiFind.split('v1')[1], function (req, res) {
30 var pois = require('./data/poi/poi-search.json'); // the json response for the api call
34 /**************************************************** *******************************************************/
35 // declare server listener port
36 var server = app.listen(9999, function () {
37 console.log('mock server listening on port %d', server.address().port);
40 ################################
44 1. create json file with the response.
45 2. add the api end point in the server file and declare the json file for the response/
51 1. go to server file folder
52 2. run command : node <FileName>