Your objective is to create a server that provides listing datafrom a JSON file. To accomplish this, you will:
- use the File System module to load listings.json intomemory
- create a request handler with the URL module to send thelisting data on a GET request to localhost:8080/listings
- use the HTTP module to create a server that makes use of thisrequest handler
We have provided skeleton code that will help guide you incompleting this assignment. There is also a file namedserver.tests.js containing unit tests to test your server oncecompleted.
I have this so far, but it doesn’t work:
var http = require(“http”);
var fs = require(“fs”);
var url = require(“url”);
var
PayPal Gateway not configured
PayPal Gateway not configured