Skip to content

Commit

Permalink
Add @bull-board/ui dependency and enable management UI in playground
Browse files Browse the repository at this point in the history
  • Loading branch information
genu committed Feb 4, 2024
1 parent 9cb496c commit 512e815
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"dependencies": {
"@bull-board/api": "^5.14.0",
"@bull-board/h3": "^5.14.0",
"@bull-board/ui": "^5.14.0",
"@nuxt/kit": "^3.10.0",
"bullmq": "^5.1.8",
"colorette": "^2.0.20",
Expand Down
1 change: 1 addition & 0 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export default defineNuxtConfig({
modules: ["../src/module"],
concierge: {
managementUI: true,
redis: {
host: "localhost",
},
Expand Down
3 changes: 2 additions & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"dev": "nuxi dev",
"build": "nuxi build",
"generate": "nuxi generate"
"generate": "nuxi generate",
"preview": "nuxi preview"
},
"devDependencies": {
"nuxt": "latest"
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ export default defineNuxtModule<ModuleOptions>({
);
}

// Transpile BullBoard api because its not ESM
nuxt.options.build.transpile.push("@bull-board/api");

nuxt.options.runtimeConfig.concierge = defu(
nuxt.options.runtimeConfig.concierge,
options
Expand Down
4 changes: 3 additions & 1 deletion src/runtime/server/routes/ui-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { BullMQAdapter } from "@bull-board/api/bullMQAdapter";
import { H3Adapter } from "@bull-board/h3";
import { useRuntimeConfig } from "#imports";
import { $useConcierge } from "#concierge";

import { consola } from "consola";

const {
Expand All @@ -14,10 +13,13 @@ const {
const serverAdapter = new H3Adapter();
serverAdapter.setBasePath("/_concierge");

const root = import.meta.dev ? "../" : "../../";

const bullboard = createBullBoard({
queues: [],
serverAdapter,
options: {
uiBasePath: `${root}node_modules/@bull-board/ui`,
uiConfig: ui,
},
});
Expand Down

0 comments on commit 512e815

Please sign in to comment.