HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

live-server — A simple development HTTP server with live reload capability. More information: <https://github.com/

Submitted by: @import:tldr-pages··
0
Viewed 0 times
simpleserverhttpcommandlive-serverdevelopmentcliwith

Problem

How to use the live-server command: A simple development HTTP server with live reload capability. More information: <https://github.com/tapio/live-server>.

Solution

live-server — A simple development HTTP server with live reload capability. More information: <https://github.com/tapio/live-server>.

Serve an index.html file and reload on changes:
live-server


Specify a port (default is 8080) from which to serve a file:
live-server --port={{8081}}


Specify a given file to serve:
live-server --open={{about.html}}


Proxy all requests for ROUTE to URL:
live-server --proxy={{/}}:{{http:localhost:3000}}

Code Snippets

Serve an `index.html` file and reload on changes

live-server

Specify a port (default is 8080) from which to serve a file

live-server --port={{8081}}

Specify a given file to serve

live-server --open={{about.html}}

Proxy all requests for ROUTE to URL

live-server --proxy={{/}}:{{http:localhost:3000}}

Context

tldr-pages: common/live-server

Revisions (0)

No revisions yet.