snort/packages/system/tests/node.ts

15 lines
343 B
TypeScript
Raw Normal View History

2023-09-12 14:02:16 +00:00
import { NostrSystem, SystemInterface } from "..";
2023-09-06 18:39:15 +00:00
const Relay = "wss://relay.snort.social/";
const system = new NostrSystem({}) as SystemInterface;
async function test() {
2023-09-12 14:02:16 +00:00
await system.ConnectToRelay(Relay, { read: true, write: true });
setTimeout(() => {
system.DisconnectRelay(Relay);
}, 1000);
2023-09-06 18:39:15 +00:00
}
2023-09-12 14:02:16 +00:00
test().catch(console.error);