Simple Test Server
Create simple test server
Installation
You probably want to install this as a dev dependency...
npm install -D simple-test-server
Usage
const createTestServer = ; const PORT = 8080;const routes = "/hello": status: 200 body: "Hello world!" headers: "content-type": "text/plain" "default": status: 404 body: "Not found" headers: "content-type": "text/plain" ; // This returns a promise // After the promise returned from createTestServer resolves, requests to// "/hello" will respond with 200, "Hello world!", with all other requests// responding with 404, "Not found".