snort/packages/system/tests/node.ts

14 lines
348 B
TypeScript
Raw Normal View History

2023-09-06 18:39:15 +00:00
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);