package
Dashboard for Agenda job scheduler
npm install agendashGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
490.4 kB
Includes dependencies.
A modern dashboard for Agenda job scheduler.


npm install agendash agenda @agendajs/mongo-backendimport express from 'express';
import { Agenda } from 'agenda';
import { MongoBackend } from '@agendajs/mongo-backend';
import { createExpressMiddleware } from 'agendash';
const app = express();
const agenda = new Agenda({
backend: new MongoBackend({ address: 'mongodb://localhost:27017/agenda' })
});
// Mount agendash at /dash
app.use('/dash', createExpressMiddleware(agenda));
app.listen(3000, () => {
console.
import Fastify from 'fastify';
import { Agenda } from 'agenda';
import { MongoBackend } from '@agendajs/mongo-backend';
import { createFastifyPlugin } from 'agendash';
const fastify = Fastify();
const agenda = new Agenda({
backend: new MongoBackend({ address: 'mongodb://localhost:27017/agenda' })
});
// Register agendash at /dash
fastify.register(createFastifyPlugin(agenda), { prefix: '/dash' });
fastify.listen({ port: 3000 }, () => {
console.
import Koa from 'koa';
import { Agenda } from 'agenda';
import { MongoBackend } from '@agendajs/mongo-backend';
import { createKoaMiddleware } from 'agendash';
const app = new Koa();
const agenda = new Agenda({
backend: new MongoBackend({ address: 'mongodb://localhost:27017/agenda' })
});
// Mount agendash at /dash
const { router, middleware } = createKoaMiddleware(agenda, '/dash');
app.use(middleware);
app.use(router.routes());
import Hapi from '@hapi/hapi';
import { Agenda } from 'agenda';
import { MongoBackend } from '@agendajs/mongo-backend';
import { createHapiPlugin } from 'agendash';
const agenda = new Agenda({
backend: new MongoBackend({ address: 'mongodb://localhost:27017/agenda' })
});
const server = Hapi.server({ port: 3000 });
await server.register({
plugin: createHapiPlugin(agenda),
options: { basePath: '/dash' }
});
await
Important: The Agendash dashboard provides full access to view, create, requeue, and delete jobs. You should always protect it with authentication before deploying to production.
Example with basic auth (Express):
import basicAuth from 'express-basic-auth';
// Protect the dashboard with basic auth
app.use('/dash', basicAuth({
users: { 'admin': 'secure-password' },
challenge: true
}));
// Then mount agendash
app.use('/dash', expressMiddleware(agenda));For production environments, consider using:
Never expose the dashboard to the public internet without authentication.
To run agendash in development mode with hot reloading:
# From the agendash package directory
pnpm devThis starts a development server with:
MIT
simison
mikael@ihminen.org