# express-livereload

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

Latest version **0.0.24** (published 2012-11-06) · 0 weekly downloads

## Install

```sh
npm install express-livereload
pnpm add express-livereload
yarn add express-livereload
bun add express-livereload
```

## Health

**Score 0/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.24 |
| Published | 2012-11-06 |
| First published | 2012-09-22 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mnmly |

## Links

- npm: https://www.npmjs.com/package/express-livereload
- npm.io page: https://npm.io/package/express-livereload

## Dependencies (1)

- [livereload](https://npm.io/package/livereload.md) git://github.com/mnmly/node-livereload.git

## Recent versions

- 0.0.24 (latest) — 2012-11-06
- 0.0.23 — 2012-09-26
- 0.0.22 — 2012-09-23
- 0.0.21 — 2012-09-22
- 0.0.2 — 2012-09-22
- 0.0.1 — 2012-09-22

## README

# Express Livereload

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

### Installation

npm install express-livereload

### Usage

    livereload = require('express-livereload')
    app        = express()

    livereload(app, config={})

#### 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>



### 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"


[node-livereload]: https://github.com/napcs/node-livereload#options

---
_Source: https://npm.io/package/express-livereload · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
