comparison webtty.js @ 177:5372f1f97cf5

Move index.html files. The RLGWebD index.html no longer needs to be renamed when installing.
author John "Elwin" Edwards
date Wed, 14 Jan 2015 15:16:31 -0500
parents c4a32007d2dc
children
comparison
equal deleted inserted replaced
176:bf518a00190b 177:5372f1f97cf5
144 } 144 }
145 145
146 function serveStatic(req, res, fname) { 146 function serveStatic(req, res, fname) {
147 var nname = path.normalize(fname); 147 var nname = path.normalize(fname);
148 if (nname == "" || nname == "/") 148 if (nname == "" || nname == "/")
149 nname = "index.html"; 149 nname = "index-sh.html";
150 if (nname.match(/\/$/)) 150 if (nname.match(/\/$/))
151 path.join(nname, "index.html"); /* it was a directory */ 151 path.join(nname, "index.html"); /* it was a directory */
152 var realname = path.join(serveStaticRoot, nname); 152 var realname = path.join(serveStaticRoot, nname);
153 var extension = path.extname(realname); 153 var extension = path.extname(realname);
154 fs.exists(realname, function (exists) { 154 fs.exists(realname, function (exists) {