Implement addAdbPublicKey endpoint

Reason: manually approve adb connection from web UI does not scale for test automation. Especially those that are using different adb keys on each session (eg: via container)

This changes also added swagger doc endpoint. Using `stf local` command, it will end up at: `http://localhost:7106/docs/`
This commit is contained in:
Akhmad Fathonih
2017-12-05 13:23:57 +09:00
parent 0e751ca3d7
commit 524fd566b7
4 changed files with 94 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ var events = require('events')
var express = require('express')
var SwaggerExpress = require('swagger-express-mw')
var SwaggerUi = require('swagger-tools/middleware/swagger-ui');
var cookieSession = require('cookie-session')
var Promise = require('bluebird')
var _ = require('lodash')
@@ -71,6 +72,7 @@ module.exports = function(options) {
if (err) {
throw err
}
app.use(SwaggerUi(swaggerExpress.runner.swagger));
swaggerExpress.register(app)
})