Permalink
Browse files

docs for customizing the kue app

props to nathan for the suggestion, forgot about app mounting haha
  • Loading branch information...
1 parent c3998b9 commit 02136c24fac8a82df757a16df1db9fc0301763ec @tj tj committed Jul 22, 2011
Showing with 17 additions and 2 deletions.
  1. +11 −0 Readme.md
  2. +6 −2 examples/video.js
View
@@ -314,6 +314,17 @@ running this example you'll see the following output:
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).
+## Securing Kue
+
+ Through the use of app mounting you may customize the web application, enabling TLS, or adding additional middleware like Connect's `basicAuth()`.
+
+```js
+var app = express.createServer({ ... tls options ... });
+app.use(express.basicAuth('foo', 'bar'));
+app.use(kue.app);
+app.listen(3000);
+```
+
## License
(The MIT License)
View
@@ -1,5 +1,6 @@
-var kue = require('../');
+var kue = require('../')
+ , express = require('express');
// create our job queue
@@ -49,5 +50,8 @@ function convertFrame(i, fn) {
}
// start the UI
-kue.app.listen(3000);
+var app = express.createServer();
+app.use(express.basicAuth('foo', 'bar'));
+app.use(kue.app);
+app.listen(3000);
console.log('UI started on port 3000');

0 comments on commit 02136c2

Please sign in to comment.