Skip to content

Commit

Permalink
Close #217 Configure basePath doc (#218)
Browse files Browse the repository at this point in the history
* Close #217 Configure basePath doc

Added documentation how to configure basePath in the Readme.md

* Changed basePath value to 'my-base-path'
  • Loading branch information
softbrix authored Jan 24, 2021
1 parent 991e230 commit cd9d819
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,28 @@ app.use('/admin/queues', router)

That's it! Now you can access the `/admin/queues` route and you will be able to monitor everything that is happening in your queues 😁

### Hosting router on a sub path

If you host your express service on a different path than root (/) ie. https://<server_name>/<sub_path>/, then you can add the following code to provide the configuration to the bull-board router. In this example the sub path will be `my-base-path`.

```js
const { router } = require('bull-board');

// ... express server configuration

let basePath = 'my-base-path';

app.use(
'/queues',
(req, res, next) => {
req.proxyUrl = basePath + '/queues';
next();
},
router);
```

You will then find the bull-board UI at the following address `https://<server_name>/my-base-path/queues`.

## Contributing

First of all, thank you for being interested in helping out, your time is always appreciated in every way. 💯
Expand Down

0 comments on commit cd9d819

Please sign in to comment.