Skip to content

Instantly share code, notes, and snippets.

@tim-smart
Forked from augustl/server.js
Created July 2, 2010 12:23
Show Gist options
  • Save tim-smart/461283 to your computer and use it in GitHub Desktop.
Save tim-smart/461283 to your computer and use it in GitHub Desktop.
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'application/json'});
res.write('{"json":');
if (Math.random() < 0.1) {
// ??
}
res.write('"here"}');
res.end();
}).listen(8124);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment