On Github Store constructor has _collection property:
var Store = module.exports = function (agenda) {
if (!agenda) {throw new Error('agenda is undefined. Check agenda config.');}
this.agenda = agenda;
this.collection = agenda._collection;
};
In downloaded package you will see property name called _db and no error throwing:
var Store = module.exports = function (agenda) {
this.agenda = agenda;
this.db = agenda._db;
};
TypeError: Cannot read property 'count' of undefined
at Store.count ({PROJECT_DIR}/node_modules/agenda-ui/lib/store.js:41:37)
at Store.definitions ({PROJECT_DIR}/node_modules/agenda-ui/lib/store.js:69:26)
at {PROJECT_DIR}/node_modules/agenda-ui/lib/api.js:13:11
at Layer.handle [as handle_request] ({PROJECT_DIR}/node_modules/express/lib/router/layer.js:82:5)
at next ({PROJECT_DIR}/node_modules/express/lib/router/route.js:100:13)
at Route.dispatch ({PROJECT_DIR}/node_modules/express/lib/router/route.js:81:3)
at Layer.handle [as handle_request] ({PROJECT_DIR}/node_modules/express/lib/router/layer.js:82:5)
at {PROJECT_DIR}/node_modules/express/lib/router/index.js:234:24
at Function.proto.process_params ({PROJECT_DIR}/node_modules/express/lib/router/index.js:312:12)
at {PROJECT_DIR}/node_modules/express/lib/router/index.js:228:12
It happens because agenda instance has _collection property, but not _db.
Guys, seems like @moudy stopped development of this library.
There is a good alternative Agendash
I'm using it for a weeks, pretty good and useful UI interface for Agenda
Steps to reproduce:
On Github Store constructor has _collection property:
In downloaded package you will see property name called _db and no error throwing:
Actually it doesn't work with agenda@0.7.9, request for http://localhost:3030/agenda/definitions if failing with error:
It happens because agenda instance has _collection property, but not _db.