index.js
function cmd(request, response)
{
	var urlpath = url.parse(request.url).pathname;
	var param = url.parse(request.url).query;
	//    var localpath = path.join(process.cwd(), urlpath); // OLD
	var localpath = path.join(__dirname, urlpath);	// NEW
	fs.exists(localpath, function(result) { runScript(result, localpath, param, response)});
}
function cmd(request, response)
{
	var urlpath = url.parse(request.url).pathname;
	var param = url.parse(request.url).query;
	//    var localpath = path.join(process.cwd(), urlpath); // OLD
	var localpath = path.join(__dirname, urlpath);	// NEW
	fs.exists(localpath, function(result) { runScript(result, localpath, param, response)});
}
function cmd ( request , response ) { var urlpath = url . parse ( request . url ) . pathname ; var param = url . parse ( request . url ) . query ; //    var localpath = path.join(process.cwd(), urlpath); // OLD var localpath = path . join ( __dirname , urlpath ) ; // NEW fs . exists ( localpath , function ( result ) { runScript ( result , localpath , param , response ) } ) ; }
/*
CMD - The Command
/ * CMD - The Command