app=function(req,res)
{
res.writeHead(200,{\'Content-Type\':\'text/plain\'})
var buffer=new Buffer(100)
var fs=require(\'fs\')
fs.open(\'.\'+req.url,\'r\',functi
Since you've designed your app to process files one after another (synchronously), you need to use fs.readSync() but be warned that, while your app is reading a file in this way, it cannot do anything else.
A better approach would be to process the files in the "node way", that is asynchronously.
-- node.fs - one line, no waiting