August 21st, 2024

Lightweight HTML hot reload tool for front end developers

A new Node.js package, Live HTML, offers a CLI tool for serving HTML files locally with hot reloading. It enhances productivity and serves as an alternative to Visual Studio Code's Live Server.

Read original articleLink Icon
Lightweight HTML hot reload tool for front end developers

A new Node.js package called Live HTML has been released, providing a lightweight command-line interface (CLI) tool that serves as an alternative to the Live Server extension in Visual Studio Code. The package, published as version 1.0.3, allows users to serve HTML files locally with hot reloading capabilities, enhancing productivity. To get started, users need to install the package globally using the command `npm i -g @abenezer-daniel/live-html`, navigate to their project directory, and launch the server on a specified port (recommended options include 2000, 3000, 4000, or 5000) using the command `live-html port-number`. After launching, users can access their HTML files in a browser at `http://localhost:port-number/path/to/your/file`. For the hot reload feature to function correctly, a valid HTML skeleton with a body tag is required. If the HTML file is named index.html, users can simply enter the root URL. The tool is designed to automatically reflect changes made to the HTML file in the browser without needing a manual refresh.

- Live HTML is a new CLI tool for serving HTML files locally.

- It offers hot reloading to improve development efficiency.

- Users must install the package globally and specify a port to launch the server.

- A valid HTML skeleton is necessary for the hot reload feature to work.

- The tool is a lightweight alternative to the Live Server extension in VS Code.

Link Icon 0 comments