el

express-livereload

Adds livereload functionality to express app to make development easier on express app without repetitive ⌘ + S

Showing:

Popularity

Downloads/wk

559

Maintenance

No Maintenance Data Available

Package

Dependencies

1

Size (min+gzip)

24.5KB

License

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Express Livereload

This is really small plugin for express, which will run LiveReload server simultaniously for development.

Static Helper

This plugin will attach LRScript which renders the snippet for loading livereload.js script.

layout.jade

doctype 5
html
  head
    title= title
    link(rel='stylesheet', href='/stylesheets/style.css')
    != LRScript

compiled.html

<!DOCTYPE html>
<html>
  <head>
    <title>Express</title>
    <link rel="stylesheet" href="/stylesheets/style.css">
    <script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js"></' + 'script>')</script>
  </head>
</html>

Usage

app = express()
livereload(app, config={})

Config options

config objects can accept same options as node-livereload does, but with one extra key to specify which directry to watch out for.

config.watchDir = /path/to/dir or process.cwd() + "/public"

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial