Skip to content

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

Description

@davej

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions