From time to time, it’s useful to be able to serve a bunch of static files in a web server to see how the various elements behave.
I’ve been spending some time with Node.js over the last few weeks, and am finding that there are tons of useful tools that can be installed with one command, that make developing a pleasure.
So, if you don’t already have Node.js installed, go and do that now, it will also install npm, which is indispensible.
After this is installed, you can open a command prompt and install http-server
With this installed, you can move to any directory and simply type:
And this will start a web server on port 8080 that you can then view the files from.