Skip to content

Commit

Permalink
Close felixmosh#217 Configure basePath doc
Browse files Browse the repository at this point in the history
Added documentation how to configure basePath in the Readme.md
  • Loading branch information
softbrix authored Jan 20, 2021
1 parent 991e230 commit c108233
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 sub path (ie. https://<server_name>/<base_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 `taurus`.

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

// ... express server configuration

let basePath = 'taurus';

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

You will then find the bull-board UI at the following address `https://<server_name>/taurus/admin/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 c108233

Please sign in to comment.