Skip to content

Instantly share code, notes, and snippets.

@reuben
Last active January 4, 2016 17:59
Show Gist options
  • Select an option

  • Save reuben/8658050 to your computer and use it in GitHub Desktop.

Select an option

Save reuben/8658050 to your computer and use it in GitHub Desktop.
geoserver.js
var http = require('http');
var server = http.createServer(function (request, response) {
console.log("Serving request");
response.writeHead(200, {
"Cache-Control": "no-cache",
"Content-Type": "application/x-javascript",
});
var json = {
status: "OK",
location: {
lat: -19.92083,
lng: -43.93778,
},
accuracy: 100,
};
response.end(JSON.stringify(json) + "\n");
});
server.listen(8000);
console.log("Server running at http://127.0.0.1:8000/");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment