I am Hack Sparrow
Captain of the Internets.

Archive for February, 2013

How to serve static HTML files in Express.js

Express.js comes with a badass HTML pre-processor, Jade, but sometimes you may just want to use the good old HTML files for whatever reason. Is there a way to accomplish this? Oh yes, there is! The short and quick answer to this requirement is - dump the files in the [obj]public[/obj] directory! There is a slightly more elaborate but cleaner method, which will help you from cluttering up your [obj]public[/obj] directory with the HTML files - use the [obj]static[/obj] middleware. Create ...