From c14a0521c97b272dff3057cf0c1d51b607b7b839 Mon Sep 17 00:00:00 2001 From: Akilan Selvacoumar <31743758+Akilan1999@users.noreply.github.com> Date: Sat, 10 Feb 2024 22:18:46 +0000 Subject: [PATCH] Update README.md for extending server. --- README.md | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 567b3f3..d74be67 100644 --- a/README.md +++ b/README.md @@ -71,26 +71,30 @@ This project aims to create a peer to peer (p2p) network, where a user can use t package main import ( - "github.com/Akilan1999/p2p-rendering-computation/abstractions" - "os" + "fmt" + "github.com/Akilan1999/p2p-rendering-computation/abstractions" ) func main() { - // check if the config file exists - if _, err := os.Stat("config.json"); err != nil { - // Initialize with base p2prc config files - _, err := abstractions.Init(nil) - if err != nil { - return - } - } - - // start p2prc - _, err := abstractions.Start() - if err != nil { - return - } + _, err := abstractions.Init(nil) + if err != nil { + fmt.Println(err) + return + } + + // start p2prc + _, err = abstractions.Start() + if err != nil { + fmt.Println(err) + return + } + + // Run server till termination + for { + + } } + ``` ### Export once this is added export P2PRC as environment paths