Skip to content

Instantly share code, notes, and snippets.

@dlwr
Last active April 27, 2016 09:30
Show Gist options
  • Save dlwr/765f741ced1313290c86719ed82de013 to your computer and use it in GitHub Desktop.
Save dlwr/765f741ced1313290c86719ed82de013 to your computer and use it in GitHub Desktop.
toste
const http = require('http');
function check(request, response) {
if (request.url === '/favicon.ico') {
response.writeHead(200, {'Content-Type': 'image/x-icon'} );
response.end();
return;
}
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end(`チェックワンツー、ワンツー`);
}
http.createServer(check).listen(3100);
http.createServer(check).listen(80);
http.createServer(check).listen(443);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment