Skip to content

Instantly share code, notes, and snippets.

@chee
Created May 12, 2016 01:59
Show Gist options
  • Save chee/e65f1fa2754b435d595c5fb84606e6a3 to your computer and use it in GitHub Desktop.
Save chee/e65f1fa2754b435d595c5fb84606e6a3 to your computer and use it in GitHub Desktop.
curl my ip
require('http').createServer((request, response) => {
response.statusCode = 200
response.setHeader('Content-Type', 'text/plain')
response.end(request.connection.remoteAddress)
}).listen(80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment