chrome-remote-multiplex
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -574,2 +574,6 @@ 'use strict'; | ||
function reportHttpError(req, err) { | ||
LOG.error("Error in " + req.method + " " + req.originalUrl + ": " + err); | ||
} | ||
/* | ||
@@ -592,3 +596,3 @@ * Web page that provides links to debug | ||
})); | ||
}); | ||
}).catch(reportHttpError.bind(this, req)); | ||
}); | ||
@@ -604,3 +608,3 @@ })(); | ||
res.send(JSON.stringify(t.targets, null, 2)); | ||
}); | ||
}).catch(reportHttpError.bind(this, req)); | ||
} | ||
@@ -607,0 +611,0 @@ app.get('/json', getTargetList); |
module.exports = { | ||
MultiplexServer: require("dist/multiplex").default | ||
MultiplexServer: require("./dist/multiplex").default | ||
}; |
{ | ||
"name": "chrome-remote-multiplex", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Allows multiple Chrome DevTools Clients to connect to a single Remote Debugger (ie Chrome Headless) instance", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -30,2 +30,23 @@ # chrome-remote-multiplex | ||
## Embedding in your application | ||
You can embed the multiplex proxy server in your own application: | ||
``` | ||
var MultiplexServer = require("chrome-remote-multiplex").MultiplexServer; | ||
var ChromeRemoteInterface = require('chrome-remote-interface'); | ||
var server = new MultiplexServer({ | ||
logging: "debug" | ||
}); | ||
server.listen() | ||
.then(() => { | ||
// Use chrome-remote-interface to connect back to the server we've just created | ||
return ChromeRemoteInterface({ port: server.options.listenPort }); | ||
}); | ||
``` | ||
There is a full example in 'https://github.com/johnspackman/chrome-remote-multiplex/blob/master/example/embed.js' | ||
## Contributing | ||
@@ -32,0 +53,0 @@ Please feel free to raise issues, pull requests, and questions. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66755
671
58