1.0.5 • Published 10 years ago
static-folder v1.0.5
##Installation##
sudo npm install -g static-folder
##Example##
var http_server = require('http').createServer(http_handler),
static = require('static-folder').init("folder");//select the folder that contains the files
function http_handler(req,res){
var url = static.splitUrl(req);
switch(url[0]){
case "/static":
static.send(res,url[1]);
break;
}
}