MCPcopy
hub / github.com/wuchangming/spy-debugger / startWeinreServer

Function startWeinreServer

lib/weinre/weinreDelegate.js:31–56  ·  view source on GitHub ↗
(port)

Source from the content-addressed store, hash-verified

29};
30
31function startWeinreServer(port) {
32 var weinreServer = weinre.run({
33 httpPort: port,
34 boundHost: '-all-',
35 verbose: false,
36 debug: false,
37 readTimeout: 5,
38 deathTimeout: 15
39 });
40 weinreServer.on('listening', function () {
41 // auto open debugger page
42 if (!/window/i.test(process.platform)) {
43 child_process.exec('open http://127.0.0.1:' + port + '/client');
44 } else {
45 child_process.exec('start http://127.0.0.1:' + port + '/client');
46 }
47 new SpyProxy({
48 weinewPort: port,
49 port: spyProxyPort
50 });
51 console.log(logColor.FgGreen + '%s' + logColor.Reset, '浏览器打开 ---> http://127.0.0.1:' + port + '/client');
52 });
53 weinreServer.on('error', function (e) {
54 console.error(e);
55 });
56}

Callers 1

weinreDelegate.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected