When working on prototypes for our clients it is very important that we can easily run them from a web root to ensure that we will see the same behavior that our clients will. There are lots of ways to do this but for a simple html mockup that needs no preprocessing options like vhosts in Apache or even setting up MAMP require more work than the task is worth.
Luckily with Node.js creating a simple script that will serve static content is super easy. It can be done in as little as 3 lines of code. So while this is very simple it does add dependencies to your project that are not really necessary. And even writing those 3 lines of code each time you just need a static web server is more effort that should be required.
With this in mind we created HTTPster. HTTPster is a script written in node.js that allows you to start a simple web server with just one command. By default it starts a server on port 3333 and serves documents from the directory that the command was run.
Under the hood it uses express and really is not much more complicated that the 3 line script I would have written each time I needed it. But really running a single command from the CLI is much easier.