
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
livelocalhost
Advanced tools
A simple localhost development server with hot reloading. Serves any local directory, watches for file changes, and triggers live browser reloading.
Run LiveLocalhost from the command line:
npx livelocalhost
You can also install it globally:
npm install livelocalhost -g
and serve static files using:
llh
or
livelocalhost
Once started, you can access http://localhost:8000/ in your browser.
Options can can be set with --name=value, or --name value format.
| parameter | description |
|---|---|
-e, --env <file> | load defaults from an .env file |
-p, --serveport <port> | HTTP port (default 8000) |
-d, --servedir <dir> | directory to serve (./) |
-r, --reloadservice <path> | path to reload service (/livelocalhost.service) |
-j, --hotloadJS | enable hot reloading of JavaScript files (false) |
-w, --watchDebounce <ms> | debounce time for file changes (default 600) |
-l, --accessLog | show server access log (false) |
-v, --version | show application version |
-?, --help | show CLI help |
-E, --helpenv | show .env/environment variable help |
-A, --helpapi | show Node.js API help |
The reloadservice need only be changed if you want to disable or change the Server Sent Events handler path. By default, the path is /livelocalhost.service. A client-side script at /livelocalhost.service.js is injected into HTML files to trigger reloading.
Hot reloading of client-side JavaScript is disabled unless you enable --hotloadJS. This refreshes the whole page when any JavaScript file changes.
--watchDebounce sets a delay time to ensures multiple file changes do not trigger more than one live reload.
Examples:
llh --serveport 8080 --servedir=./build/ --reloadservice /reload
The first two non-dashed parameters are presumed to be the port and directory:
llh 8080 ./build/
You can also use environment variables to configure options - enter llh -E for details.
Stop the server with Ctrl | Cmd + C.
You can use livelocalhost in your Node.js projects - enter llh -A for details.
Install it into your project:
npm install livelocalhost
Optionally add --save-dev to ensure it's only loaded in development mode.
Import the module into a JavaScript file (such as index.js):
import { livelocalhost } from 'livelocalhost';
set options as necessary, e.g.
livelocalhost.serveport = 8080;
livelocalhost.servedir = './build/';
livelocalhost.reloadservice = '/reload';
livelocalhost.hotloadJS = true;
livelocalhost.watchDebounce = 2000;
livelocalhost.accessLog = true;
(If not explicitly set, the options fall back to environment variables and defaults.)
Execute the .start() method:
livelocalhost.start();
Launch your application as normal, e.g. node index.js.
accessLog option@import works.<link> elements such as sitemaps, feeds, and favicons.package.json fix.FAQs
localhost development server with live reloading
The npm package livelocalhost receives a total of 11 weekly downloads. As such, livelocalhost popularity was classified as not popular.
We found that livelocalhost demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.