Skip to content

Commit 02136c2

Browse files
committed
docs for customizing the kue app
props to nathan for the suggestion, forgot about app mounting haha
1 parent c3998b9 commit 02136c2

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

‎Readme.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,17 @@ running this example you'll see the following output:
314314

315315
now when you visit Kue's UI in the browser you'll see that jobs are being processed roughly 8 times faster! (if you have 8 cores).
316316

317+
## Securing Kue
318+
319+
Through the use of app mounting you may customize the web application, enabling TLS, or adding additional middleware like Connect's `basicAuth()`.
320+
321+
```js
322+
var app = express.createServer({ ... tls options ... });
323+
app.use(express.basicAuth('foo', 'bar'));
324+
app.use(kue.app);
325+
app.listen(3000);
326+
```
327+
317328
## License
318329

319330
(The MIT License)

‎examples/video.js‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

2-
var kue = require('../');
2+
var kue = require('../')
3+
, express = require('express');
34

45
// create our job queue
56

@@ -49,5 +50,8 @@ function convertFrame(i, fn) {
4950
}
5051

5152
// start the UI
52-
kue.app.listen(3000);
53+
var app = express.createServer();
54+
app.use(express.basicAuth('foo', 'bar'));
55+
app.use(kue.app);
56+
app.listen(3000);
5357
console.log('UI started on port 3000');

0 commit comments

Comments
 (0)