LiveLocalhost quickstart

148 words, 1-minute read

To use LiveLocalhost, you should have a directory of static site files containing HTML and assets such as CSS, JavaScript, images, video, etc. LiveLocalhost starts a local web server so you navigate the site in a web browser.

Start a web server #

LiveLocalhost can be run without installation using npx. Assuming you’re in the site’s root directory, enter:

terminal

npx livelocalhost

then open http://localhost:8000/ in your browser.

Press Ctrl | Cmd + C in the terminal to stop the server.

Use a different port and directory #

To use a different HTTP port and directory path:

npx livelocalhost --serveport 8888 --servedir ./path/

LiveLocalhost help #

For help, enter:

terminal

npx livelocalhost --help

Install LiveLocalhost globally #

You can also install LiveLocalhost globally and use identical CLI options:

terminal

npm install livelocalhost -g

then run it using:

terminal

livelocalhost

or

terminal

llh