Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro committed Apr 8, 2012
1 parent e9b8d70 commit e29a790
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server.js
Expand Up @@ -60,6 +60,12 @@ app.get('/', function(req, res){
res.write('<footer>Archive made by <a href="//alejandromorales.co.cc">Alejandro Morales</a></footer>')
res.end('</body></html>');
});
app.get('/myip',function(req,res){
var ip = req.connection.remoteAddress || req.socket.remoteAddress;
if (req.headers["x-real-ip"]) ip =req.headers["x-real-ip"];
console.log(ip)
res.end(ip)
})
var months = function(){
return fs.readdirSync(path.join(__dirname,'/posts'));
};
Expand Down

0 comments on commit e29a790

Please sign in to comment.