Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update walkthrough_setup.md #666

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions nats-concepts/what-is-nats/walkthrough_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,72 @@ For MacOS:
brew tap nats-io/nats-tools
brew install nats-io/nats-tools/nats
```
# Setting Up NATS Server in Your PATH

This guide will help you add the NATS server to your PATH for both current and future terminal sessions.

## Step 1: Add NATS Server to PATH

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:

```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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not neccesary, the reason you have to do this is because your homebrew setup is incorrect. Correctly install homebrew and this will just work

These paths are also very unusual and probably due to something that went wrong with your homebrew


```
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 [<flags>] <command> [<args> ...]

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:

Expand Down