Registry / web-framework / alive-server

alive-server

JSON →
library1.3.0jsnpmunverified

Alive Server is a fork of live-server, a simple development HTTP server with live reload capability for front-end development. The latest stable version is 1.3.1 (released January 2023). It supports middleware injection, custom mime types, SPA mode, and HTTPS. Key differentiators from live-server include active maintenance, merged PRs, and support for config file (.alive-server.json). It is designed for local development only, not production deployment.

npm install alive-server
INSTALL
IMPORT
SIG · ALIVE-SERVER
A
alive-server
web-frameworkjavascriptv1.3.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

programmatic API
import { default as aliveServer } from 'alive-server';
const aliveServer = require('alive-server');
The package is a CLI tool, but it can be used programmatically via CommonJS require. No default export; use require().
liveServer
const liveServer = require('alive-server'); exports the start function
import { liveServer } from 'alive-server';
Only CommonJS require works; no named export 'liveServer'.
start
const { start } = require('alive-server');
import { start } from 'alive-server';
The module exports a 'start' function via CommonJS. ESM import is not supported directly.
params
const params = require('alive-server').params;
import { params } from 'alive-server';
params is an object exported via module.exports, only accessible via require.

Shows both CLI and programmatic usage of alive-server with custom port, ignored files, and middleware.

// Install globally: npm install -g alive-server // Then serve current directory: // alive-server --port=3000 --open=/index.html --no-browser // Programmatic usage (CommonJS): const liveServer = require('alive-server'); const params = { port: 9000, host: '0.0.0.0', root: process.cwd(), open: false, ignore: '*.scss', file: 'index.html', wait: 100, mount: [['/components', './node_modules']], logLevel: 2, middleware: [function(req, res, next) { next(); }] }; liveServer.start(params);
alive-server --version
Debug
Known issues
gotchaThe config file is named .alive-server.json, not .live-server.json (since v1.3.0). Using .live-server.json will be ignored.
fix
Rename .live-server.json to .alive-server.json
affects: >=1.3.0
deprecatedThe --ignorePattern flag is deprecated in favor of --ignore (anymatch patterns).
fix
Use --ignore instead of --ignorePattern
affects: >=1.2.8
breakingIn v1.3.0, the ignore and watch fields in config file changed from string to array format. A single string will no longer be accepted.
fix
Ensure ignore and watch values in .alive-server.json are arrays (e.g., ["*.scss"])
affects: >=1.3.0
deprecatedThe option --https-module is replaced by --https pointing to a config module; the old flag may be removed.
fix
Use --https=PATH to a JS file exporting an HTTPS configuration object
affects: >=1.2.8
gotchaThe package does not have a default export; requiring 'alive-server' returns an object with start and params. Using import will fail unless using a CommonJS interop.
fix
Use require('alive-server') instead of import
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'send'
Missing dependency 'send' when using programmatic API without installing dependencies.
fix
Run 'npm install send' in your project or ensure alive-server is installed globally with all dependencies.
TypeError: liveServer.start is not a function
Trying to use ESM import (e.g., import liveServer from 'alive-server') which returns undefined.
fix
Use const liveServer = require('alive-server'); /* then liveServer.start(params) */
alive-server: command not found
alive-server is not installed globally or not in PATH.
fix
Run 'npm install -g alive-server' and ensure npm global bin directory is in PATH.
port is already in use
The specified port is occupied by another process.
fix
Use --port to specify a different port, or kill the process using the current port.
Upgrade
Version history
1.3.0latest on npm
Audit
Dependencies
sendrequiredUsed to serve static files (required at runtime)
Agent activity
37 hits · last 30 days
node
34
OpenAI (training)
1
Resources
alive-server — npm install alive-server · libregistry