summaryrefslogtreecommitdiff
path: root/modules/subd-krokodil
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/subd-krokodil
Initial
Diffstat (limited to 'modules/subd-krokodil')
-rw-r--r--modules/subd-krokodil/subd-krokodil.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/subd-krokodil/subd-krokodil.js b/modules/subd-krokodil/subd-krokodil.js
new file mode 100644
index 0000000..beabddd
--- /dev/null
+++ b/modules/subd-krokodil/subd-krokodil.js
@@ -0,0 +1,21 @@
+var cmn=require("../$common.js"),
+ fs=require("fs"),
+ express=require("express");
+
+module.exports=function(app,io,moddir){
+ var router=express.Router();
+
+ router.use(function(req,res,next){
+ next();
+ });
+
+ router.get("/",function(req,res){
+ res.sendFile(cmn.rootdir+"/web_files/krokodil.jpg");
+ });
+
+ app.use(function(req,res,next){
+ if(req.subdomains.length&&req.subdomains[req.subdomains.length-1]=="krokodil"){
+ router.handle(req,res,next);
+ } else next();
+ });
+};