0.1.0 • Published 8 years ago

winterfresh v0.1.0

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

Winterfresh

npm install --save-dev winterfresh

Easily refresh your browser in sync with your server.

  1. Install locally and require Winterfresh on your server.
    $ npm install --save-dev winterfresh
    const winterfresh = require('winterfresh');

  2. Route '/fresh?' requests to Winterfresh.
    router.get('/fresh?', (req, res) => winterfresh(res));

  3. Include client-winterfresh.js in your html file. You can attain a copy of Winterfresh by either going to the GitHubRepository and downloading it, using RawGit or copying its path within your local node_modules folder.

    <script src="path/to/js/winterfresh.js" defer></script>

Now, every time your server restarts your browser will refresh, as well.

Twitter
GitHub
npm