Node.js is a server-side runtime environment built on Chrome’s V8 JavaScript engine. It provides an event-driven, non-blocking (asynchronous) I/O and cross-platform runtime environment. It enables you to build scalable server-side applications using JavaScript and is open-source.
Node.js can be used to build applications like command-line applications, web applications, REST API servers, and many else. It is mostly used to create network programs like web servers. For more information, visit the official site at https://nodejs.org.
Before you can start building your Node.js
app, you need to install npm
and Node.js
. npm
is included in the Node.js
installation.
It is possible to download the libraries and organize the directories on your own and start that way. However, as your project (and list of dependencies) grows, this will quickly become messy. It also makes collaborating and sharing your code much more difficult.
We recommend using a package manager on your OS.
Install the Windows package manager Chocolatey.
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Install Node.js
choco install nodejs
Install the Mac package manager Homebrew.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Node.js
brew install nodejs