Very often I need to look at some files in the browser. For this I use http-server. It is a lightweight and simple cli http server for node.
Just install it with npm:
npm install http-server -g
Then run it:
http-server . -c-1
The -c-1 arg busts the cache (cache =-1)
For convenience I have a small fish function for it:
function serve
http-server $argv -c-1
end
So when I want to serve something I just do:
serve .
Starting up http-server, serving . on: http://0.0.0.0:8080
Hit CTRL-C to stop the server