Optional: Package Manager based on your OS
Optional: Node Version Manager
Required: Node LTS(Long-Time Support) Version (JS runtime)
Required: pnpm (JS package manager)
Backend Required: Docker
Install Homebrew (Homepage)
Install UniGetUi (Homepage)
Use the package manager bundled with your distro
You're a Linux user. You already have an opinion on this.
A package manager gives you a central location for adding, updating, upgrading and deleting packages on your computer.
Install nvm (GitHub) with your chosen package manager.
Install fnm (GitHub) with UniGetUi
A Node Version Manager lets you install multiple versions of Node and easily switch between them.
Install Node LTS version
nvm install --ltsfnm install --ltsNode is a runtime for running JS programs kinda like how the JVM runs Java.
This is used to run JS on the server, which is an absolute requirement for backend, and an additional requirement for frontend where some pages might need server rendering.
We try to keep the Node version at the current LTS for a balance between stability and new features.
Enable corepack
corepack enableInstall pnpm globally
corepack install -g pnpmTo update your pnpm version run:
corepack upWe use pnpm as we find it better to use than npm which comes with Node.
npm is built so every dependency is downloaded locally per project. This takes a lot of disk space when you have multiple projects on your PC.
pnpm works around this by downloading dependencies globally. This lets pnpm reuse the same dependencies with the same versions of different projects.
It is also easier to develop together when we all use the same .lock file.
If you find it annoying to have multiple JS package managers I recommend checking out Antfu's ni which automatically runs commands with the right package managers based on what lock file there is.
Install Docker Desktop (Official Docs) (GUI for Docker)
Alternatively, install Docker Engine if you don't want the GUI and would rather use the terminal
We use Docker to run a Postgres database for local development.
Docker is only needed for backend api development