From 228ddac6434a287c3e41292974d4d659beb0c185 Mon Sep 17 00:00:00 2001 From: Percs <83934299+Percslol@users.noreply.github.com> Date: Sun, 7 Jul 2024 17:48:31 -0500 Subject: [PATCH] update readme --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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";