Before you can start writing Node.js, you need to install Node.js runtime along with NPM on your computer. NPM is the package manager used to install packages like Express.js, nodemon, and dotenv.
javascript
# Check Node.js version
node -v
# Check NPM version
npm -v
# Create a practice folder
mkdir nodejs-practice
cd nodejs-practicenode -v checks whether Node.js is installed. npm -v checks whether the package manager is available. mkdir creates a folder, and cd moves into it.
You should see
v20.11.1 10.2.4Info
If a version number shows up, the install worked. If you get "command not found", close and reopen your terminal. If it still doesn't work, reinstall Node.js.
What's Next
Once setup is done, head to the First App lesson and actually run a server file.