mirror of
https://github.com/openstf/stf
synced 2025-10-03 17:59:28 +02:00
Add socket.io with authentication and start rebuilding the device list.
This commit is contained in:
parent
176310cb6d
commit
9ed2524a7f
17 changed files with 285 additions and 14 deletions
19
lib/cli.js
19
lib/cli.js
|
@ -335,6 +335,12 @@ program
|
|||
.option('-a, --auth-url <url>'
|
||||
, 'URL to auth client'
|
||||
, String)
|
||||
.option('-u, --connect-sub <endpoint>'
|
||||
, 'sub endpoint'
|
||||
, cliutil.list)
|
||||
.option('-c, --connect-push <endpoint>'
|
||||
, 'push endpoint'
|
||||
, cliutil.list)
|
||||
.action(function(options) {
|
||||
if (!options.secret) {
|
||||
this.missingArgument('--secret')
|
||||
|
@ -342,12 +348,23 @@ program
|
|||
if (!options.authUrl) {
|
||||
this.missingArgument('--auth-url')
|
||||
}
|
||||
if (!options.connectSub) {
|
||||
this.missingArgument('--connect-sub')
|
||||
}
|
||||
if (!options.connectPush) {
|
||||
this.missingArgument('--connect-push')
|
||||
}
|
||||
|
||||
require('./roles/app')({
|
||||
port: options.port
|
||||
, secret: options.secret
|
||||
, ssid: options.ssid
|
||||
, authUrl: options.authUrl
|
||||
, groupTimeout: 10000
|
||||
, endpoints: {
|
||||
sub: options.connectSub
|
||||
, push: options.connectPush
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -493,6 +510,8 @@ program
|
|||
, '--port', options.appPort
|
||||
, '--secret', options.authSecret
|
||||
, '--auth-url', util.format('http://localhost:%d/', options.authPort)
|
||||
, '--connect-sub', options.bindAppPub
|
||||
, '--connect-push', options.bindAppPull
|
||||
])
|
||||
.catch(function(err) {
|
||||
log.error('app died', err.stack)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue