25 |
26 |
27 |
28 |
29 |
30 | Nuxt Concierge
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | # Nuxt 3 Minimal Starter
2 |
3 | Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
4 |
5 | ## Setup
6 |
7 | Make sure to install the dependencies:
8 |
9 | ```bash
10 | # npm
11 | npm install
12 |
13 | # pnpm
14 | pnpm install
15 |
16 | # yarn
17 | yarn install
18 |
19 | # bun
20 | bun install
21 | ```
22 |
23 | ## Development Server
24 |
25 | Start the development server on `http://localhost:3000`:
26 |
27 | ```bash
28 | # npm
29 | npm run dev
30 |
31 | # pnpm
32 | pnpm run dev
33 |
34 | # yarn
35 | yarn dev
36 |
37 | # bun
38 | bun run dev
39 | ```
40 |
41 | ## Production
42 |
43 | Build the application for production:
44 |
45 | ```bash
46 | # npm
47 | npm run build
48 |
49 | # pnpm
50 | pnpm run build
51 |
52 | # yarn
53 | yarn build
54 |
55 | # bun
56 | bun run build
57 | ```
58 |
59 | Locally preview production build:
60 |
61 | ```bash
62 | # npm
63 | npm run preview
64 |
65 | # pnpm
66 | pnpm run preview
67 |
68 | # yarn
69 | yarn preview
70 |
71 | # bun
72 | bun run preview
73 | ```
74 |
75 | Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
76 |
--------------------------------------------------------------------------------
/src/runtime/server/routes/ui-handler.ts:
--------------------------------------------------------------------------------
1 | import { defineEventHandler, setResponseStatus } from "h3";
2 | import { createBullBoard } from "@bull-board/api";
3 | import { BullMQAdapter } from "@bull-board/api/bullMQAdapter";
4 | import { H3Adapter } from "@bull-board/h3";
5 | import { useRuntimeConfig } from "#imports";
6 | import { $useConcierge } from "#concierge";
7 | import { consola } from "consola";
8 | import { resolvePath } from "mlly";
9 | import { dirname } from "pathe";
10 |
11 | const serverAdapter = new H3Adapter();
12 | serverAdapter.setBasePath("/_concierge");
13 |
14 | export default defineEventHandler(async (event) => {
15 | const {
16 | concierge: { ui, managementUI },
17 | } = useRuntimeConfig();
18 |
19 | const logger = consola.create({}).withTag("nuxt-concierge");
20 | const uiPath = dirname(
21 | await resolvePath("@bull-board/ui/package.json", {
22 | url: import.meta.url,
23 | })
24 | );
25 |
26 | if (!managementUI) {
27 | logger.warn("Concierge is disabled");
28 | setResponseStatus(event, 404);
29 |
30 | return "";
31 | }
32 |
33 | const { queues } = $useConcierge();
34 |
35 | createBullBoard({
36 | queues: queues.map((queue) => new BullMQAdapter(queue)),
37 | serverAdapter,
38 | options: {
39 | uiBasePath: uiPath,
40 | uiConfig: ui,
41 | },
42 | });
43 |
44 | const uiRouter = serverAdapter.registerHandlers();
45 |
46 | return uiRouter.handler(event);
47 | });
48 |
--------------------------------------------------------------------------------
/docs/components/Header.vue:
--------------------------------------------------------------------------------
1 |
8 |
9 |