auto-refresher

    0.0.1 • Public • Published

    Auto Refresher

    Refresh the browser page if called. It works well with gulp and nodemon (or gulp-nodemon).

    Installation

    $ npm install auto-refresher
    

    Usage

    In gulpfile.js:

    var gulp = require('gulp');
    var nodemon = require('gulp-nodemon');
     
    var refresh = require('auto-refresher')({
        port: 7890,
        redirect: "http://192.168.1.100:3000"
    });
     
    gulp.task("nodemon", function () {
        nodemon({
            script: "app.js",
            ext: "js html ejs",
        })
        .on('restart', function () {
            // delay to refresh until server restarted
            setTimeout(refresh, 500);
        });
    });

    Keywords

    none

    Install

    npm i auto-refresher

    DownloadsWeekly Downloads

    1

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • gyson