created by Brian LeRoux & Andrew Lunny. sparodically uncurated by David Trejo.

Less of a wtf and more of a gotcha. In ExpressJS. you can serve static files from a /public directory with this simple directive in your configure block:

    configure(function() {
        set("root", __dirname);  
        // allow static file serving from public directory
        use(Static); 
    });

But be careful! This sets a the path to be /public/app.css rather than /app.css. More background here.

Fork me on GitHub