summaryrefslogtreecommitdiff
path: root/modules/subd-krokodil
diff options
context:
space:
mode:
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();
+ });
+};