I'm using a rather ugly approach:
var app = require('express')(),
    server = require('http').createServer(app),
    fs = require('fs');
server.listen(80);
path = "/Users/my/path/";
var served_files = {};
["myfile1.html","myfile2.html","myfile3.html"].forEach(function(file){
    served_files["/"+file] = fs.readFileSync(path+file,"utf8");
});
app.use(function(req,res){
    if (served_files[req.path]) 
        res.send(files[req.path]);
});
What's the proper way to do it?
 
     
     
     
     
     
     
     
    