# Install http-server module globally
npm install http-server -g
# Navigate to any directory you want the server to run in
cd /path/to/dir/with/files
# Launch HTTP server
http-server
# Launch HTTP server on different port
http-server -p 8888
Now visit http://127.0.0.1:8080 to access your files.
If you have PHP 5.4.x or higher installed locally, you can launch a PHP server from any directory.
# Navigate to any directory you want the server to run in
cd /path/to/dir/with/files
# Launch HTTP server
php -S localhost:8000
Now visit https://localhost:8000 to access your files.