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

How to run agenda-ui against an express app that uses agenda #19

Open
amirmo opened this issue Nov 19, 2015 · 3 comments
Open

How to run agenda-ui against an express app that uses agenda #19

amirmo opened this issue Nov 19, 2015 · 3 comments

Comments

@amirmo
Copy link

amirmo commented Nov 19, 2015

I'm confused as how this module is used.

I have an express app and have done the following as per the readme instructs.

var express = require('express');
var Agenda = require('agenda');
var agendaUI = require('agenda-ui');

var app = express();
var agenda = new Agenda(...)

app.use('/agenda-ui', agendaUI(agenda, {poll: 1000}));

then from the root of my express app:
~> cd node_modules/agenda-ui

npm install

but then there was no bower install in the app/ directory. so I couldn't run the bower install

When I go to: localhost//agenda-ui I get 404. I'm not quite sure what's going on.

Could you instruct as how I can run agenda-ui against my express app that uses agenda. ...? thanks

@helsont
Copy link

helsont commented Jan 13, 2016

+1

@khurrumqureshi
Copy link

Configure agenda-ui on your agenda ready event.

agenda.on('ready', function () {
   // we need to do this to resolve #18 
   agenda._db = agenda._collection;
   app.use('/agenda-ui', agendaUI(agenda, {poll: 60000}));
});

@keligijus
Copy link

I think this should be part of documentation as it is not completely obvious how to use the UI now.

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

4 participants