I've been doing a lot of tinkering recently with various HTML/CSS snippets, such as working on a grid-based layout using semantic.gs.
I came up with* a straight-forward solution. You will need to have node.js installed on your machine, as well as the connect middleware (the latter can be installed simply by running
npm install connect in a terminal session).
var util = require('util'), connect = require('connect'), port = 1337; connect.createServer(connect.static(__dirname)).listen(port); util.puts('Listening on ' + port + '...'); util.puts('Press Ctrl + C to stop.');
Then just fire up a terminal/command prompt session and run
node server.js. You'll now be able to access your HTML files, etc. via http://localhost:1337/my-example-file.html.
* NB: I am aware that I'm almost certainly not the first to think of this. This blog post serves mainly as a reference for me in the future!