static-folder
v1.0.5
Published
Simple static folder handler
Downloads
4
Readme
##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;
}
}