Installing NodeJS and Running Your First Web App
Installing NodeJS and Running Your First Web App
• LTS (Long Term Support): Recommended for most users for stability.
• Current: Includes the latest features but may not be as stable.
Choose LTS and click on the Windows Installer link to download the .msi
installer.
1
This will display the installed Node.js version. 3. To check if npm (Node Package
Manager) is installed, type the following command and press Enter:
1 npm -v
2
Summary
You have now successfully installed Node.js and npm on Windows. You can
start developing Node.js applications or install additional packages using npm.
If curl is not installed, you may need to manually download the binary if
you don’t have root access.
2
1 source ~/. zshrc
You can also add the following manually to the end of the file:
1 export NVM_DIR = " $HOME /. nvm "
2 [ -s " $NVM_DIR / nvm . sh " ] && \. " $NVM_DIR / nvm . sh "
3
Step 8: Managing Multiple Node.js Versions
Switch between Node.js versions:
1 nvm use 16.14.0
4
2. Create a new file called app.js. This will be the main entry point for the
application.
5
Step 7: Use VSCode Built-in Git GUI for Version
Control
1. Open the Source Control tab in VSCode (Ctrl + Shift + G). 2. Click
”Initialize Repository” to initialize Git. 3. Stage the changes by clicking the +
icon next to the modified files. 4. Commit your changes by writing a commit
message (e.g., Initial commit) and clicking the checkmark (). 5. Add the
GitLab repository as a remote by running the following command:
1 git remote add origin your - gitlab - repository - url
2
6. Push the changes to GitLab via the Source Control tab by clicking the three
dots, selecting Push, and pushing to the repository.