Skip to content

Instantly share code, notes, and snippets.

@slavahatnuke
Created December 9, 2015 16:54
Show Gist options
  • Save slavahatnuke/64a05514dd41be9510be to your computer and use it in GitHub Desktop.
Save slavahatnuke/64a05514dd41be9510be to your computer and use it in GitHub Desktop.
var http = require('http');
var fs = require('fs');
var img = fs.readFileSync('1x1.gif');
var server = http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'image/gif' });
res.end(img, 'binary');
});
var port = 3000;
server.listen(port, '0.0.0.0', function() {
console.log('Started on port ' + port);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment