diff --git a/README.md b/README.md index 8e6d830..04a3d97 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,16 @@ Here is an example of using bare-mux: /// As an end-user import { BareMuxConnection } from "@mercuryworkshop/bare-mux"; const conn = new BareMuxConnection("/bare-mux/worker.js"); + // Set Bare-Client transport +// If your transport is an ES module and exports the class as the default export +await conn.setTransport("/bare-mux/transport-module.js", ["arg1", "ws://localhost:4000"]); + +// Set Transport Manually await conn.setManualTransport(` const exports = await import("/bare-mux/transport.js"); return new exports.BareClient("https://tomp.app"); `); -// If your transport is an ES module and exports the class as the default export -await conn.setTransport("/bare-mux/transport-module.js", ["arg1", "ws://localhost:4000"]); /// As a proxy developer import { BareClient } from "@mercuryworkshop/bare-mux";