Simple autoreload server for serving static/json files etc.

Simple autoreload server for serving static/json files etc.

Sometimes you need to serve some static content on a local port e.g. 8080 but without a real HTTP proxy server like nginx. Just opening your html/js from file:// sometimes may have an issue with including another static content: json files, fonts due to SOP/CORS restrictions.

To easily solve it you can install simple-autoreload-server (node and npm required):

sudo npm install -g simple-autoreload-server

Then go to dir with index.html and run:

autoreload-server -p 8080 --no-list-directory
#nodejs #HTTP #autoreload
0
Ivan Borshchov profile picture
Apr 06, 2017
by Ivan Borshchov
Did it help you?
Yes !
No

Best related

Other by Ivan Borshchov