Hello everybody,
DummyTechDev will show you how to set up the basic Node development environment for your MacOs in 2024 (and later).
We all know that Node.JS (wider: JavaScript family) has been the trending tech for years (We believe the trend started around 2017, but we could be wrong haha).
Nowadays, there is a lot of stuff indeed, but we don’t really need to install a lot on our local machine/MacBook.
Let’s get started!
Note: this guide is working for both Apple Sillicon chips and Intel chips
Let’s set up Node development environment with DummyTechDev
Brew
Brew is an awesome Package Manager for your MacOS that can install a wide range of development tools, libraries, dependencies, etc.
We believe 99% of engineers have Brew installed in their MacOS.
Install brew is super simple & straightforward, one-liner command run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Git
Git is pretty much a standard in the Software Development world. A must-have for developers nowadays.
By default, when you run the git
command in your MacOS terminal, if Git hasn’t been installed yet, MacOS will open XCode helper and show you the Installation wizard.
The overall installation only takes several minutes.
NVM (Node version manager)
NVM (Node version manager) is a super solid tool that helps us manage, install, and use any Node version.
We don’t really have to install the binary from the NodeJS website.
You can either install by following the guide from the NVM repository or use Brew:
brew install nvm
After installing nvm, to use Node 20 as the default, let’s run these lines:
nvm install 20 # install node 20
nvm use 20 # set the default node of your mac to 20
# You can run this to verify the node version
node -v
Note: for older versions (e.g. 14 or 12), there will be some unexpected errors for Apple Silicon chips, consider using 16 and above (we should do that, 12 and 14 are EOL and no longer supported)
IDEs or Code Editors
In order to code, we need an IDE/Code Editor indeed. There are several choices:
- Visual Studio Code: free & open-sourced, large community, and has a lot of plugins for Node.JS projects
- WebStorm: subscription-required, an awesome IDE with a lot of built-in features, code smelling, suggestions, etc.
- In Early 2024, WebStorm included the Local LLM (large language model), it will try to learn and give you the code suggestion (single line only)
- Zed: lightweight code editor written in Rust
- CotEditor: another lightweight code editor
- Vim
- …
Other tools/software you might consider
- Docker, if you want to install some dependencies e.g.: Database, Queue.
- Database management tools: TablePlus, DBeaver, etc.
Ending words – set up Node development environment
So that’s how we do the first initial setup for our NodeJS work. We mainly focus on:
- Simplicity
- Minimalism
- Resilient
A simple setup will definitely keep you at a good pace in the long run (and save your MacBook’s battery too)
Thank you for reading and have a great day!