0.0.1 • Published 10 years ago
auto-refresher v0.0.1
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);
});
});
0.0.1
10 years ago