Use isomorphic-ws

This commit is contained in:
2023-09-06 19:39:15 +01:00
parent e81420d4a9
commit 106ad437f1
4 changed files with 59 additions and 12 deletions

View File

@ -0,0 +1,14 @@
import {NostrSystem, SystemInterface} from "..";
const Relay = "wss://relay.snort.social/";
const system = new NostrSystem({}) as SystemInterface;
async function test() {
await system.ConnectToRelay(Relay, {read: true, write: true});
setTimeout(() => {
system.DisconnectRelay(Relay);
}, 1000);
}
test().catch(console.error);