Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual reload function not available when folder passed to instant function #13

Open
davej opened this issue Oct 14, 2015 · 0 comments
Open

Comments

@davej
Copy link

davej commented Oct 14, 2015

I can do ins.reload() no problem if I initialised ins with no params (i.e. ins = instant()) but if I pass a root folder to instant (i.e. ins = instant("/some/folder")) then the ins.reload is undefined.

var express = require('express');
var instant = require('instant');

var app = express();
var ins = instant("/some/folder/");

app.use(ins);

app.get('/tick', function(req, res) {
  res.send('Current date: ' + new Date());
});

// Trigger a reload of the page every 10 seconds:
setInterval(function() {
  ins.reload('/tick');
}, 10000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant