This content originally appeared on DEV Community and was authored by Jon Webb
You will need node
(required), git
(optional), and yarn
(optional) to develop Node applications. I also use an optional package manager, homebrew
to install these tools.
To check whether you already have these tools, you can run:
brew -v
node -v
yarn -v
git --version
If these commands each output a version number, you already have the tools installed and you are ready to go.
Homebrew
Homebrew is an extremely useful package manager for Mac. To install it, run the following:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Node.js
Node.js is a Javascript runtime that executes in a server environment.
Install Node.js if you don't already have it. On Mac, you can easily install it using the Homebrew package manager (or from the project website):
brew install node
Git
Git is a version control system that allows you to store your code in a centralized repository that tracks your changes and can easily be backed up remotely to a service like Github.
You can install Git on Mac using Homebrew (or from the project website):
brew install git
Go ahead and configure your git identity:
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR EMAIL"
Yarn
I prefer to use the Yarn package manager for Node, instead of NPM (which is the default package manager that comes installed with Node).
Again, on Mac you can install it using Homebrew (or from the project website):
brew install yarn
All set!
You're ready to start developing Node applications on MacOS! The only other thing you will need is a text/code editor, if you don't already have one. I use vscode
, but you can use any editor you like.
This content originally appeared on DEV Community and was authored by Jon Webb
Jon Webb | Sciencx (2021-05-18T02:02:59+00:00) How to prepare a Node.js dev environment on MacOS. Retrieved from https://www.scien.cx/2021/05/18/how-to-prepare-a-node-js-dev-environment-on-macos/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.