# views-auto-reload

> a express middleware that can auto reflush your web page when the files changed

Latest version **1.0.11** (published 2016-12-12) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install views-auto-reload
pnpm add views-auto-reload
yarn add views-auto-reload
bun add views-auto-reload
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2016-12-12 |
| First published | 2016-11-24 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | diamond zhou |
| Maintainers | diamondfsd |
| Keywords | auto-realod, auto-reflush, express-auto-reflush |

## Links

- npm: https://www.npmjs.com/package/views-auto-reload
- Repository: https://github.com/k55k32/express-views-auto-reload
- Homepage: https://github.com/k55k32/express-views-auto-reload#readme
- Issues: https://github.com/k55k32/express-views-auto-reload/issues
- npm.io page: https://npm.io/package/views-auto-reload

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) ^1.1.1
- [node-watch](https://npm.io/package/node-watch.md) ^0.4.1

## Recent versions

- 1.0.11 (latest) — 2016-12-12
- 1.0.10 — 2016-12-12
- 1.0.9 — 2016-11-24
- 1.0.8 — 2016-11-24
- 1.0.7 — 2016-11-24
- 1.0.5 — 2016-11-24
- 1.0.4 — 2016-11-24
- 1.0.3 — 2016-11-24
- 1.0.2 — 2016-11-24
- 1.0.1 — 2016-11-24
- 1.0.0 — 2016-11-24

## README

# express-views-auto-reload
a express middleware that can auto reflush your web page when the files changed    

##### install
npm install views-auto-reload --save-dev

##### use
```
import express from 'express'
import autoreload from 'views-auto-reload'

let app = express()

app.set('views', path.join(__dirname, 'views'))  //set you own view path
app.set('view engine', 'jade')  //set you own view engine

app.use(autoreload(app, {suffix: ['.jade']}))

app.get('/', (req, res) => {
  // the auto-reload will overwrite the render function
  // when the hello.jade change, the client brower will execute 'location.reload()' function
  res.render('hello.jade')
})
....
....
```

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