scottmebberson.com

A quick static web server

Using Node.js and node-static

I often want to create quick and dirty prototypes, usually for demonstration purposes. Sometimes I want dynamic capabilitiy, such as that offered by Node.js and sometimes I don't. But I always want to easily serve static files.

I've created some boilerplate code in the form of a gist to make this really quick and simple (you can view the few lines of code required to create the static server below). The node-static module is responsible for the very few lines of code. Follow the readme in the gist to get started.