Created
April 29, 2019 18:16
-
-
Save bpruitt-goddard/e5b0b2c22025678561ee230c3f431e18 to your computer and use it in GitHub Desktop.
Mock Iris For LD File Import
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http'); | |
const hostname = '127.0.0.1'; | |
const port = 54499; | |
const server = http.createServer((req, res) => { | |
// GET is for retrieving file index | |
if (req.method === 'GET') | |
{ | |
res.statusCode = 404; | |
} | |
// Otherwise it is index request | |
else | |
{ | |
res.statusCode = 200; | |
} | |
res.setHeader('Content-Type', 'application/json'); | |
res.end('{}'); | |
}); | |
server.listen(port, hostname, () => { | |
console.log(`Server running at http://${hostname}:${port}/`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment