From f00ba92ed2cc1a9c24ad783e83525d1b5a85b857 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Tue, 13 Sep 2016 11:43:06 +0200 Subject: Initial --- modules/ip/ip.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 modules/ip/ip.js (limited to 'modules/ip') diff --git a/modules/ip/ip.js b/modules/ip/ip.js new file mode 100644 index 0000000..dec0a98 --- /dev/null +++ b/modules/ip/ip.js @@ -0,0 +1,8 @@ +var cmn=require("../$common.js"), + fs=require("fs"); + +module.exports=function(app,io,moddir){ + app.get("/ip",function(req,res){ + res.send(String(req.socket.remoteAddress)); + }); +}; -- cgit v1.2.3-70-g09d2