If you want to view files quickly while developing locally, then there are a number of built-in servers in various languages. Change to the directory with your files and then run:

Node (using http-server)

$ http-server

Note: this one is slightly different since this is a static server - only HTML, JS and CSS will be run.

Python 3

$ python -m http.server


$ php -S localhost:8000 // where 8000 is the port number