X-Git-Url: http://git.pjr.cc/?p=nodejsws.git;a=blobdiff_plain;f=lib%2Fwsrequest.js;h=021725bbaa16050f2f14ba82c11dc75fca573a97;hp=c7797fcea5f746121d8c51e0ba14f71fab468c50;hb=a5497b5bbc722543d5052c6ad74661a5ae38cc56;hpb=18c6c3b3419578b8fbe42b2ca0c655097c65542f diff --git a/lib/wsrequest.js b/lib/wsrequest.js index c7797fc..021725b 100644 --- a/lib/wsrequest.js +++ b/lib/wsrequest.js @@ -2,7 +2,7 @@ var url = require("url"); var path = require("path"); var fs = require("fs"); var myparse = require("./myparse.js"); -var webmain = require("./purls/main.js"); +var webmain = require("./webmain.js"); var staticExtensions = ["html", "gif", "jpg", "css", "js", "ico"]; @@ -43,7 +43,7 @@ function wsRequest(request, response) { } var thispurl = purl.pathname.split("/")[1]; - fs.stat("./lib/purls/web_"+thispurl+".js", function (err, stats) { + fs.stat("./purls/web_"+thispurl+".js", function (err, stats) { console.log("get purl is "+thispurl+" and err "+err+" and "+stats); if(err) { response.writeHead(404, {"Content-Type": "text/plain"}); @@ -51,7 +51,7 @@ function wsRequest(request, response) { response.end(); return; } - var thiserv = require("./purls/web_"+thispurl+".js"); + var thiserv = require("../purls/web_"+thispurl+".js"); if(thiserv.requireBody()) { console.log("yubber is true"); webmain.serveBody(request, response, thiserv.process);