Skip to content

Commit

Permalink
Suivre les pairs connectés
Browse files Browse the repository at this point in the history
  • Loading branch information
julienmalard committed Feb 3, 2024
1 parent afe945d commit 615d21f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/relai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export const créerNœud = async () => {
console.log(uint8ArrayToString(nœud.peerId!.privateKey!, "hex"));
fs.writeFileSync(".env", `CLEF_PRIVEE_RELAI=${clefPrivéeRelai}`);
}
nœud.addEventListener("peer:discovery", () => {
console.log("Pairs: ", nœud.getPeers());
});
return nœud;
};

Expand Down

0 comments on commit 615d21f

Please sign in to comment.