My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com

Pages










Showing posts with label brew. Show all posts
Showing posts with label brew. Show all posts

Thursday, August 15, 2024

Some simple dev setups on Mac developer machine

 Install HomeBrew on Mac:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"


==> Next steps:

- Run these two commands in your terminal to add Homebrew to your PATH:

    (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/mfaiz/.zprofile

    eval "$(/opt/homebrew/bin/brew shellenv)"

- Run brew help to get started

- Further documentation:


Install NodeJs:

brew install node@20



If you need to have node@20 first in your PATH, run:

  echo 'export PATH="/opt/homebrew/opt/node@20/bin:$PATH"' >> ~/.zshrc


For compilers to find node@20 you may need to set:

  export LDFLAGS="-L/opt/homebrew/opt/node@20/lib"

  export CPPFLAGS="-I/opt/homebrew/opt/node@20/include"


# verifies the right Node.js version is in the environment

node -v 

# verifies the right npm version is in the environment

npm -v 


In case node command etc not working then link it using following command:

% brew link node@20



Create React App:


npx create-react-app little-billi

cd my-app

npm start


If you've previously installed create-react-app globally via npm install -g create-react-app, we recommend you uninstall the package using npm uninstall -g create-react-app or yarn global remove create-react-app to ensure that npx always uses the latest version.



When npm starts the server, Then open http://localhost:3000/ to see your app.

When you’re ready to deploy to production, create a minified bundle with npm run build.

Meanwhile in browser you could see:






Tuesday, November 19, 2019

How to install Redis and run its instance


First, step first. You can simply install it using homebrew
$ brew install redis

After installation you can check that it creates a configutration file at:
/usr/local/etc/redis.conf

Then, you can verify the install as follows:
$ brew info redis

You can start an instance i.e Start Redis server using the configuration file.
$ redis-server /usr/local/etc/redis.conf

By default, it Runs in standalone mode on Port: 6379


Test if Redis server is running.
$ redis-cli ping
It will replu=y you pong!

To Uninstall Redis and its files.
$ brew uninstall redis


What more do you want. So cheers.
:)

How to install Homebrew (brew command) on Mac, linux

To Install Homebrew, you need to make use of ruby that is already installed. This is a simple command then.

On your terminal use following:

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Paste that in a macOS Terminal prompt.

The script explains what it will do and then pauses before it does it. Read about other installation options. Install Homebrew on Linux and Windows Subsystem for Linux.

Voila!! That's it.


After this you can tyest which version is installed. Eg:
$ brew --version
Homebrew 2.1.16
Homebrew/homebrew-core (git revision 6176; last commit 2019-11-18)