From c95443f41f489796b0d387160ef846b3a1e1f63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Krzy=C5=BCanowski?= Date: Tue, 28 May 2024 23:53:12 +0200 Subject: [PATCH] Update run instructions in README --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 80ba639..89c1f57 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,19 @@ Simple P2P server (and client - for testing purposes only, client for end user w ## Starting You can use these commands to start client and/or server: -``` -go run . client +```bash +go run . --run client --waddr X.X.X.X:Y --uaddr X.X.X.X:Y +# for example: +go run . --run client --waddr krzyzanowski.dev:8080 --uaddr krzyzanowski.dev:8081 ``` Note that server should be started **before** running client. -``` -go run . server +```bash +go run . --run server --waddr X.X.X.X:Y --uaddr X.X.X.X:Y +# for example: +go run . --run server --waddr krzyzanowski.dev:8080 --uaddr krzyzanowski.dev:8081 ``` -For now, address of server is hardcoded in client, and server starts on `localhost:8080`. +`--waddr` and `--uaddr` options are optional, default values are respectively `:8080` and `:8081` (which is a short form of `localhost:8080` and `localhost:8081`) + +`--run` option is mandatory and may take value of either `client` or `server`