How can I improve this Node.js file's routing?
Whether you wanna implement a static server?
If so, you can just use connect and its built-in static middlewave. With it, you just need to write the following code to implement a static server:

var connect = require("connect");

connect(
    connect.static(__dirname)
).listen(3000);


That's it.