NanoHttpd to the rescue
Quite often now I have the need to quickly start local web server to serve some static content.
Also, it occures that I need some CORS support in this server.
To fullfill those needs, I use a slightly modified version of NanoHttpd in which I enabled some basic CORS support.
As I useally work on Windows (ouhhhh), I then have a batch file that references the built webserver.jar (the one with all dependencies).
After that, wherever I am on my disk I can freely do some:
c:\somewhere>web .
to launch a webserver on default port (8080) serving files located under c:\somewhere folderc:\somewhere>web . -p 9090
to launch a webserver on port 9090 serving files located under c:\somewhere folderc:\somewhere>web . -p 9090 --cors
to launch a webserver on port 9090 serving files located under c:\somewhere folder and providing basic CORS support