LiveReload static file server that also injects livereload-js into any HTML files.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Brett Langdon 5b96814f39
Bump to 1.0.1
8 years ago
.gitignore initial version 8 years ago
README.md Change name to @brett_langdon/lrserver 8 years ago
main.js Set port to inject 8 years ago
package-lock.json Bump to 1.0.1 8 years ago
package.json Bump to 1.0.1 8 years ago

README.md

LiveReload Server

LiveReload static file server that also injects livereload-js into any HTML files.

Installation

npm install @brett_langdon/lrserver

Usage

$ lrserver --help
lrserver

Positionals:
  serve  The directory to serve static files from                       [string]

Options:
  --help        Show help                                              [boolean]
  --version     Show version number                                    [boolean]
  --bind, -b    Host/port for static server to bind to
                                            [string] [default: "127.0.0.1:3000"]
  --lrbind, -l  Host/port for LiveReload to bind to
                                           [string] [default: "127.0.0.1:35729"]
  --watch, -w   Directory to watch for changes                           [array]
# Use default settings and serve static files from current directory
lrserver

# Explicitly set the path to serve files from
lrserver path/to/files/

# Explicitly set the directory to watch and path to serve files from
lrserver --watch path/to/watch/ path/to/files/

# Setting multiple paths to watch
lrserver --watch path/1/ --watch path/2/ path/to/files/

# Change the port the static server binds to
lrserver --bind '0.0.0.0:3000'

# Change the port the LiveReload server binds to
lrserver --lrbind '0.0.0.0:35729'