LinuxCommandLibrary

live-server

Start server in current directory

TLDR

Start server in current directory

$ live-server
copy
Serve specific directory
$ live-server [public/]
copy
Custom port
$ live-server --port=[8080]
copy
Open specific file
$ live-server --open=[index.html]
copy
Watch specific files
$ live-server --watch=[src/,public/]
copy
Disable browser open
$ live-server --no-browser
copy

SYNOPSIS

live-server [options] [directory]

DESCRIPTION

live-server is a development server with live reload. It automatically refreshes browsers on file changes.
The tool is useful for front-end development. It serves static files and injects reload script.
live-server provides live reload.

PARAMETERS

DIRECTORY

Directory to serve.
--port PORT
Server port number.
--host HOST
Host address to bind.
--open PATH
Path to open in browser.
--watch PATHS
Directories to watch for changes.
--no-browser
Don't open browser.
--help
Display help information.

CAVEATS

Node.js required. Development use only. Not for production.

HISTORY

live-server was created to simplify front-end development with automatic browser refresh on file changes.

SEE ALSO

http-server(1), serve(1), python(1)

Copied to clipboard