Skip to content

Commit

Permalink
fix: fix @bull-board/ui paths, closes #300
Browse files Browse the repository at this point in the history
  • Loading branch information
felixmosh committed Jun 23, 2021
1 parent 1ee5e82 commit 65f49f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/with-express/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const run = async () => {

app.listen(3000, () => {
console.log('Running on 3000...');
console.log('For the UI of instance1, open http://localhost:3000/ui');
console.log('For the UI, open http://localhost:3000/ui');
console.log('Make sure Redis is running on port 6379 by default');
console.log('To populate the queue, run:');
console.log(' curl http://localhost:3000/add?title=Example');
Expand Down
5 changes: 3 additions & 2 deletions packages/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ export function createBullBoard({
serverAdapter: IServerAdapter;
}) {
const { bullBoardQueues, setQueues, replaceQueues, addQueue, removeQueue } = getQueuesApi(queues);
const uiBasePath = path.dirname(require.resolve('@bull-board/ui/package.json'));

serverAdapter
.setQueues(bullBoardQueues)
.setViewsPath(path.resolve('node_modules/@bull-board/ui/dist'))
.setStaticPath('/static', path.resolve('node_modules/@bull-board/ui/dist/static'))
.setViewsPath(path.join(uiBasePath, 'dist'))
.setStaticPath('/static', path.join(uiBasePath, 'dist/static'))
.setEntryRoute(appRoutes.entryPoint)
.setErrorHandler(errorHandler)
.setApiRoutes(appRoutes.api);
Expand Down

0 comments on commit 65f49f1

Please sign in to comment.