-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.js
26 lines (19 loc) · 584 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// transpile:main
import yargs from 'yargs';
import { asyncify } from 'asyncbox';
import * as driver from './lib/driver';
import * as server from './lib/server';
const { SelendroidDriver } = driver;
const { startServer } = server;
const DEFAULT_HOST = 'localhost';
const DEFAULT_PORT = 4884;
async function main () {
let port = yargs.argv.port || DEFAULT_PORT;
let host = yargs.argv.host || DEFAULT_HOST;
return await startServer(port, host);
}
if (require.main === module) {
asyncify(main);
}
export { SelendroidDriver, startServer };
export default SelendroidDriver;