From: Paul J R Date: Sat, 22 Dec 2012 19:10:44 +0000 (+1100) Subject: rearranging project layout X-Git-Url: http://git.pjr.cc/?a=commitdiff_plain;h=a5497b5bbc722543d5052c6ad74661a5ae38cc56;p=nodejsws.git rearranging project layout --- diff --git a/lib/purls/main.js b/lib/webmain.js similarity index 100% rename from lib/purls/main.js rename to lib/webmain.js 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); diff --git a/lib/purls/main_footer.js b/purls/main_footer.js similarity index 100% rename from lib/purls/main_footer.js rename to purls/main_footer.js diff --git a/lib/purls/main_head.js b/purls/main_head.js similarity index 100% rename from lib/purls/main_head.js rename to purls/main_head.js diff --git a/lib/purls/main_menu.js b/purls/main_menu.js similarity index 100% rename from lib/purls/main_menu.js rename to purls/main_menu.js diff --git a/lib/purls/web_body.js b/purls/web_body.js similarity index 100% rename from lib/purls/web_body.js rename to purls/web_body.js diff --git a/lib/purls/web_isbase.js b/purls/web_isbase.js similarity index 100% rename from lib/purls/web_isbase.js rename to purls/web_isbase.js diff --git a/lib/purls/web_nobody.js b/purls/web_nobody.js similarity index 100% rename from lib/purls/web_nobody.js rename to purls/web_nobody.js diff --git a/lib/purls/web_test.js b/purls/web_test.js similarity index 100% rename from lib/purls/web_test.js rename to purls/web_test.js