user19258362
user19258362

Reputation:

How to set local variable in terminal

I was trying to set variable in terminal, for example we use to store this variable in .env config file in different scenario and sometimes in xml or yml file but here I want to store them locally

because my am facing error for the following command

HTTP_PORT = 3002 P2P_PORT = 5002 PEERS = ws://localhost:5001 npm run dev

I am using Mac zsh terminal.

Upvotes: 1

Views: 2998

Answers (1)

Tanjin Alam
Tanjin Alam

Reputation: 2456

export KEY=value
export HTTP_PORT ="3002"
echo $HTTP_PROXY

This might help you but remember each time you close your terminal it will erase this data.

Reference HERE

Upvotes: 1

Related Questions