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

Reexport api functions in server adapters #501

Merged
merged 3 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ npm i @bull-board/koa
const express = require('express');
const Queue = require('bull');
const QueueMQ = require('bullmq');
const { createBullBoard } = require('@bull-board/api');
const { BullAdapter } = require('@bull-board/api/bullAdapter');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { ExpressAdapter } = require('@bull-board/express');
const { ExpressAdapter, createBullBoard, BullAdapter, BullMQAdapter } = require('@bull-board/express');

const someQueue = new Queue('someQueueName', {
redis: { port: 6379, host: '127.0.0.1', password: 'foobared' },
Expand Down Expand Up @@ -160,9 +157,7 @@ If you host your express service on a different path than root (/) ie. https://<

```js
const Queue = require('bull')
const { createBullBoard } = require('@bull-board/api')
const { BullAdapter } = require('@bull-board/api/bullAdapter')
const { ExpressAdapter } = require('@bull-board/express')
const { ExpressAdapter, createBullBoard, BullAdapter } = require('@bull-board/express')

const basePath = '/my-base-path';

Expand Down
5 changes: 1 addition & 4 deletions example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import * as Bull from 'bull';
import Queue3 from 'bull';
import { Queue as QueueMQ, QueueScheduler, Worker } from 'bullmq';
import express from 'express';
import { BullMQAdapter } from '@bull-board/api/src/queueAdapters/bullMQ';
import { BullAdapter } from '@bull-board/api/src/queueAdapters/bull';
import { createBullBoard } from '@bull-board/api/src';
import { ExpressAdapter } from '@bull-board/express/src';
import { ExpressAdapter, createBullBoard, BullMQAdapter, BullAdapter } from '@bull-board/express/src';

const redisOptions = {
port: 6379,
Expand Down
4 changes: 1 addition & 3 deletions examples/with-express-auth/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { ExpressAdapter } = require('@bull-board/express');
const { ExpressAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/express');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const session = require('express-session');
const bodyParser = require('body-parser');
Expand Down
4 changes: 1 addition & 3 deletions examples/with-express/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { ExpressAdapter } = require('@bull-board/express');
const { ExpressAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/express');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const express = require('express');

Expand Down
4 changes: 1 addition & 3 deletions examples/with-fastify-auth/basicAuth.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const { FastifyAdapter } = require('@bull-board/fastify');
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { FastifyAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/fastify');

module.exports.basicAuth = function basicAuth(fastify, { queue }, next) {
const authenticate = { realm: 'Bull-Board' };
Expand Down
4 changes: 1 addition & 3 deletions examples/with-fastify-auth/cookieAuth.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const { FastifyAdapter } = require('@bull-board/fastify');
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { FastifyAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/fastify');
const pointOfView = require('@fastify/view');
const path = require('path');

Expand Down
4 changes: 1 addition & 3 deletions examples/with-fastify/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { FastifyAdapter } = require('@bull-board/fastify');
const { FastifyAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/fastify');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const fastify = require('fastify');

Expand Down
4 changes: 1 addition & 3 deletions examples/with-hapi-auth/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { HapiAdapter } = require('@bull-board/hapi');
const { HapiAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/hapi');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const Hapi = require('@hapi/hapi');

Expand Down
4 changes: 1 addition & 3 deletions examples/with-hapi/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { HapiAdapter } = require('@bull-board/hapi');
const { HapiAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/hapi');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const Hapi = require('@hapi/hapi');

Expand Down
4 changes: 1 addition & 3 deletions examples/with-koa/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const { createBullBoard } = require('@bull-board/api');
const { BullMQAdapter } = require('@bull-board/api/bullMQAdapter');
const { KoaAdapter } = require('@bull-board/koa');
const { KoaAdapter, createBullBoard, BullMQAdapter } = require('@bull-board/koa');
const { Queue: QueueMQ, Worker, QueueScheduler } = require('bullmq');
const Koa = require('koa');
const Router = require('koa-router');
Expand Down
3 changes: 3 additions & 0 deletions packages/express/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export { createBullBoard } from '@bull-board/api';
export { BullAdapter } from '@bull-board/api/bullAdapter';
export { BullMQAdapter } from '@bull-board/api/bullMQAdapter';
export { ExpressAdapter } from './ExpressAdapter';
3 changes: 3 additions & 0 deletions packages/fastify/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export { createBullBoard } from '@bull-board/api';
export { BullAdapter } from '@bull-board/api/bullAdapter';
export { BullMQAdapter } from '@bull-board/api/bullMQAdapter';
export { FastifyAdapter } from './FastifyAdapter';
3 changes: 3 additions & 0 deletions packages/hapi/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export { createBullBoard } from '@bull-board/api';
export { BullAdapter } from '@bull-board/api/bullAdapter';
export { BullMQAdapter } from '@bull-board/api/bullMQAdapter';
export { HapiAdapter } from './HapiAdapter';
3 changes: 3 additions & 0 deletions packages/koa/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export { createBullBoard } from '@bull-board/api';
export { BullAdapter } from '@bull-board/api/bullAdapter';
export { BullMQAdapter } from '@bull-board/api/bullMQAdapter';
export { KoaAdapter } from './KoaAdapter';