Permalink
Browse files

without basepath

  • Loading branch information...
1 parent 2ca8047 commit 0059298122daf5b120252a809d8fbe929d61ac13 @zentooo committed Nov 10, 2010
Showing with 3 additions and 8 deletions.
  1. +0 −1 TODO
  2. +1 −1 demo.js
  3. +1 −5 lib/http-proxy-selective.js
  4. +1 −1 replaces/css/red.css
View
1 TODO
@@ -1,2 +1 @@
* print settings when server starts
-* run with omitting root dir
View
2 demo.js
@@ -1,6 +1,6 @@
var http = require("http"),
static = require('node-static'),
- selective = require('http-proxy-selective');
+ selective = require('./lib/http-proxy-selective');
var file = new static.Server('./demofiles');
View
6 lib/http-proxy-selective.js
@@ -68,15 +68,11 @@ function chkoptions(options) {
console.log("filter is missing or not a object");
process.exit(1);
}
- if ( ! options.basepath || typeof options.basepath !== "string" ) {
- console.log("basepath is missing or not a string");
- process.exit(1);
- }
}
function createStatics(options) {
var statics = {},
- basepath = trimslash(options.basepath);
+ basepath = trimslash(options.basepath || '.');
for ( host in options.filter ) {
statics[host] = {};
View
2 replaces/css/red.css
@@ -1,3 +1,3 @@
p {
- color: black;
+ color: blue;
}

0 comments on commit 0059298

Please sign in to comment.