|
@ -42,6 +42,7 @@ var server = https.createServer(options, function (req, res) { |
|
|
res.writeHead(200, { 'Content-Type': 'text/plain' }); |
|
|
res.writeHead(200, { 'Content-Type': 'text/plain' }); |
|
|
res.end('You are from: ' + req.connection.remoteAddress); |
|
|
res.end('You are from: ' + req.connection.remoteAddress); |
|
|
}); |
|
|
}); |
|
|
|
|
|
req.resume(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
server.listen(common.PORT, "127.0.0.1", function() { |
|
|
server.listen(common.PORT, "127.0.0.1", function() { |
|
@ -59,6 +60,7 @@ server.listen(common.PORT, "127.0.0.1", function() { |
|
|
server.close(); |
|
|
server.close(); |
|
|
process.exit(); |
|
|
process.exit(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
res.resume(); |
|
|
}); |
|
|
}); |
|
|
req.end(); |
|
|
req.end(); |
|
|
}); |
|
|
}); |
|
|