Use isomorphic-ws
This commit is contained in:
14
packages/system/tests/node.ts
Normal file
14
packages/system/tests/node.ts
Normal 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);
|
Reference in New Issue
Block a user