var static =  require('node-static');


var fileServer = new static.Server('./', { cache: 1});

require('http').createServer(function (request, response) {
      request.addListener('end', function () {
                fileServer.serve(request, response);
                    });
}).listen(8080);

var static =  require('node-static');
var PORT = 8080;

var fileServer = new static.Server('./', { cache: 1});

var server = require('http').createServer(function (request, response) {
    console.log("[" + request.method + "] " + request.url);

    fileServer.serve(request, response);
}).listen(PORT);

console.log("[SERVER] - Listening on :" + PORT);

Update the file serving script