summaryrefslogtreecommitdiff
path: root/modules/ip
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2016-09-13 11:43:06 +0200
committertomsmeding <tom.smeding@gmail.com>2016-09-13 11:44:11 +0200
commitf00ba92ed2cc1a9c24ad783e83525d1b5a85b857 (patch)
tree4d1c00a47c7f3842bcf3dece83d3c00ed3ae459f /modules/ip
Initial
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));
+ });
+};