Permalink
Browse files

Fixed static files serving which was failing because of bad paths

  • Loading branch information...
1 parent b501564 commit 1596413fd5b69cc31ec8f2013ba9ba8c8e9581d3 Jakub Stastny aka Botanicus committed with Apr 5, 2010
Showing with 10 additions and 9 deletions.
  1. +10 −9 debug.js
View
@@ -7,15 +7,16 @@ debug.listen = function (port, host) {
fu.listen(port, host);
};
-fu.get("/", fu.staticHandler("index.html"));
-fu.get("/screen.css", fu.staticHandler("screen.css"));
-fu.get("/jquery.treeview.css", fu.staticHandler("jquery.treeview.css"));
-fu.get("/jquery.js", fu.staticHandler("jquery.js"));
-fu.get("/jquery.cookie.js", fu.staticHandler("jquery.cookie.js"));
-fu.get("/jquery.treeview.js", fu.staticHandler("jquery.treeview.js"));
-fu.get("/jquery.treeview.async.js", fu.staticHandler("jquery.treeview.async.js"));
-fu.get("/treeview-default.gif", fu.staticHandler("treeview-default.gif"));
-fu.get("/treeview-default-line.gif", fu.staticHandler("treeview-default-line.gif"));
+var path = require("path");
+fu.get("/", fu.staticHandler(path.join(__dirname, "index.html")));
+fu.get("/screen.css", fu.staticHandler(path.join(__dirname, "screen.css")));
+fu.get("/jquery.treeview.css", fu.staticHandler(path.join(__dirname, "jquery.treeview.css")));
+fu.get("/jquery.js", fu.staticHandler(path.join(__dirname, "jquery.js")));
+fu.get("/jquery.cookie.js", fu.staticHandler(path.join(__dirname, "jquery.cookie.js")));
+fu.get("/jquery.treeview.js", fu.staticHandler(path.join(__dirname, "jquery.treeview.js")));
+fu.get("/jquery.treeview.async.js", fu.staticHandler(path.join(__dirname, "jquery.treeview.async.js")));
+fu.get("/treeview-default.gif", fu.staticHandler(path.join(__dirname, "treeview-default.gif")));
+fu.get("/treeview-default-line.gif", fu.staticHandler(path.join(__dirname, "treeview-default-line.gif")));
fu.get("/eval", function (req, res) {
var uri = url.parse(req.url, true);

0 comments on commit 1596413

Please sign in to comment.