npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@monque/dashboard-express

v0.1.0

Published

Express adapter for serving the Monque dashboard

Readme

@monque/dashboard-express

Serve the Monque dashboard from your Express application alongside its Management API. The router includes the built dashboard and supports nested mount paths and direct job links.

View screenshots.

Installation

Requires Node.js 22.12 or newer and Express 5.2.1 or newer within version 5.

bun add @monque/dashboard-express @monque/management-express @monque/management @monque/core express mongodb

No frontend build, React installation, or separate dashboard server is required.

Usage

Add the routers to your existing Express app and reuse its initialized Monque instance. For a new application, the following is a complete server entrypoint:

import { Monque } from '@monque/core';
import { createDashboardExpressRouter } from '@monque/dashboard-express';
import { createManagementExpressRouter } from '@monque/management-express';
import express from 'express';
import { MongoClient } from 'mongodb';

const client = await MongoClient.connect('mongodb://localhost:27017');
const monque = new Monque(client.db('my-app'));
await monque.initialize();
monque.start();

const app = express();

app.use('/ops', createManagementExpressRouter({ monque }));
app.use(
	'/ops/dashboard',
	createDashboardExpressRouter({
		apiBaseUrl: '/ops',
		pollingIntervalMs: 15_000,
	}),
);

app.listen(3000);

Open http://localhost:3000/ops/dashboard. Register your application's workers before monque.start() and enqueue or schedule jobs through Monque. On application shutdown, call await monque.stop() before closing the MongoDB client. See the core README for workers and scheduling.

Configuration

Pass your settings to createDashboardExpressRouter() in server code. The router supplies the browser configuration automatically.

| Setting | Example | Meaning | | --- | --- | --- | | Dashboard mount | app.use('/ops/dashboard', …) | URL where the dashboard is served; its base path is inferred automatically. | | apiBaseUrl | '/ops' | Required Management router mount URL. The dashboard appends /api/v1/.... | | pollingIntervalMs | 15_000 | Base job refresh interval while visible. Statistics and health refresh less often. Omit to disable periodic polling. |

Do not include /api/v1 in apiBaseUrl. In the example, the jobs endpoint is /ops/api/v1/jobs. The API and dashboard may use different mount paths.

apiBaseUrl also accepts a sync or async ({ req, res }) => string resolver for request-dependent URLs. Router options can come from your application's environment configuration; no dashboard-specific environment variables are required.

The Management API exposes OpenAPI JSON at /ops/openapi.json in this example. Pass openApi: false to createManagementExpressRouter() to disable it.

Authentication and permissions

The example allows unauthenticated access. To require your application's login or session, mount its middleware before both routers:

app.use('/ops', requireOperator);

requireOperator is middleware supplied by your application. This mount protects the dashboard, assets, API, and OpenAPI document. Browser API requests include credentials, so same-origin session cookies work automatically. If you use separate mount prefixes, protect both.

Pass the authenticated principal through the Management router's context callback and check permissions in authorize. For a read-only dashboard, pass readOnly: true to the Management router. Permissions are enforced by the API and reflected in available dashboard actions.

See Management Express for API configuration and Management for authorization options.

Serving assets

Enable gzip or Brotli at your reverse proxy or through Express compression middleware mounted before the routers. The adapter sets cache headers for fingerprinted assets; keep HTML and runtime configuration uncached so configuration changes take effect on reload.