From bfb30d14f0f864a4dab3b1d6fcefca39b9a2dbb8 Mon Sep 17 00:00:00 2001 From: Vaibhav Patil Date: Sun, 21 Apr 2024 15:30:49 +0530 Subject: [PATCH 1/3] Update walkthrough_setup.md --- .../what-is-nats/walkthrough_setup.md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/nats-concepts/what-is-nats/walkthrough_setup.md b/nats-concepts/what-is-nats/walkthrough_setup.md index 50d21415c..10fd5a4b0 100644 --- a/nats-concepts/what-is-nats/walkthrough_setup.md +++ b/nats-concepts/what-is-nats/walkthrough_setup.md @@ -15,6 +15,45 @@ brew tap nats-io/nats-tools brew install nats-io/nats-tools/nats ``` +Note : +This example adds ants server  to your path for both the current and future terminals: +echo "export PATH=\$PATH:~/usr/local/Cellar/nats/0.1.4/bin" >> ~/.zshrc +vi changes source ~/.zshrc +Then going fwd run nats command like this and will get below response +``` +% nats +usage: nats [] [ ...] + +NATS Utility + +NATS Server and JetStream administration. + +See 'nats cheat' for a quick cheatsheet of commands + +Commands: + account Account information and status + bench Benchmark utility + consumer JetStream Consumer management + context Manage nats configuration contexts + errors Error code documentation + events Show Advisories and Events + kv Interacts with a JetStream based Key-Value store + latency Perform latency tests between two NATS servers + micro Micro Services discovery and management + object Interacts with a JetStream based Object store + publish Generic data publish utility + request Generic request-reply request utility + reply Generic service reply utility + rtt Compute round-trip time to NATS server + schema Schema tools + server Server information + stream JetStream Stream management + subscribe Generic subscription client + +Pass --help to see global flags applicable to this command. +``` + + For Arch Linux: ```shell From f2ca5865553fa0557139f8929c3225ba02f5a22b Mon Sep 17 00:00:00 2001 From: Vaibhav Patil Date: Sun, 19 May 2024 16:57:44 +0530 Subject: [PATCH 2/3] Update walkthrough_setup.md review changes added --- nats-concepts/what-is-nats/walkthrough_setup.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nats-concepts/what-is-nats/walkthrough_setup.md b/nats-concepts/what-is-nats/walkthrough_setup.md index 10fd5a4b0..b69fe7cdb 100644 --- a/nats-concepts/what-is-nats/walkthrough_setup.md +++ b/nats-concepts/what-is-nats/walkthrough_setup.md @@ -16,9 +16,14 @@ brew install nats-io/nats-tools/nats ``` Note : -This example adds ants server  to your path for both the current and future terminals: +This example adds nats server to your path for both the current and future terminals: + +1 Open it using classpath ediator add it below line class path part + echo "export PATH=\$PATH:~/usr/local/Cellar/nats/0.1.4/bin" >> ~/.zshrc -vi changes source ~/.zshrc + +2 verify changes showing or using vi changes source ~/.zshrc + Then going fwd run nats command like this and will get below response ``` % nats From f472ce9c265c030776c16aeb3b7ebf2ff0bf37dc Mon Sep 17 00:00:00 2001 From: Vaibhav Patil Date: Sun, 19 May 2024 17:07:56 +0530 Subject: [PATCH 3/3] Update walkthrough_setup.md --- .../what-is-nats/walkthrough_setup.md | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/nats-concepts/what-is-nats/walkthrough_setup.md b/nats-concepts/what-is-nats/walkthrough_setup.md index b69fe7cdb..dc1e1aa54 100644 --- a/nats-concepts/what-is-nats/walkthrough_setup.md +++ b/nats-concepts/what-is-nats/walkthrough_setup.md @@ -14,17 +14,39 @@ For MacOS: brew tap nats-io/nats-tools brew install nats-io/nats-tools/nats ``` +# Setting Up NATS Server in Your PATH -Note : -This example adds nats server to your path for both the current and future terminals: +This guide will help you add the NATS server to your PATH for both current and future terminal sessions. -1 Open it using classpath ediator add it below line class path part +## Step 1: Add NATS Server to PATH -echo "export PATH=\$PATH:~/usr/local/Cellar/nats/0.1.4/bin" >> ~/.zshrc +First, you need to append the NATS server directory to your PATH variable. This can be done by adding the following line to your `.zshrc` file. You can use a text editor like `vi` for this purpose: -2 verify changes showing or using vi changes source ~/.zshrc +```sh +vi ~/.zshrc +``` +In the editor, add the following line at the end of the file: +``` +export PATH=\$PATH:~/usr/local/Cellar/nats/0.1.4/bin +``` +Save and exit the editor. +## Step 2: Source the .zshrc File +Next, apply the changes to your current session: + +```sh +source ~/.zshrc +``` + +## Step 3: Verify the Setup +Now you can run the nats command. If the setup is correct, you should get a response similar to the one below: Then going fwd run nats command like this and will get below response + +```sh +nats +``` +You should see output indicating that the NATS server is running correctly. + ``` % nats usage: nats [] [ ...]