summaryrefslogtreecommitdiff
path: root/modules/ip
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ip')
-rw-r--r--modules/ip/ip.js8
1 files changed, 8 insertions, 0 deletions
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));
+ });
+};