Node.js and npm
Node.js is a runtime environment that enables us to run the JavaScript code outside of the browser, making it a very powerful and useful tool for developing various applications.
npm is a repository of Node.js packages and also a command-line utility for accessing and managing those packages. Using npm we can easily initiate a new Node.js project and import any desired project from the library of available projects.
To use Node.js:
-
Install it from the official website(npm included);
-
Open the command prompt and type in
node --versionto check if node is correctly installed (if Node's version is displayed, everything installed correctly);

There are some useful commands:
- Initiating a new node:
npm init; - Installing new packages:
npm install <package name>; - Running a node script:
node <script name>.
With the help of Node we can set up a React project and test it conveniently using a package called create-react-app provided by Facebook, that includes all the required tools. We will explore more about it in a later section.
Merci pour vos commentaires !
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Posez-moi des questions sur ce sujet
Résumer ce chapitre
Afficher des exemples du monde réel
Awesome!
Completion rate improved to 2.7
Node.js and npm
Glissez pour afficher le menu
Node.js is a runtime environment that enables us to run the JavaScript code outside of the browser, making it a very powerful and useful tool for developing various applications.
npm is a repository of Node.js packages and also a command-line utility for accessing and managing those packages. Using npm we can easily initiate a new Node.js project and import any desired project from the library of available projects.
To use Node.js:
-
Install it from the official website(npm included);
-
Open the command prompt and type in
node --versionto check if node is correctly installed (if Node's version is displayed, everything installed correctly);

There are some useful commands:
- Initiating a new node:
npm init; - Installing new packages:
npm install <package name>; - Running a node script:
node <script name>.
With the help of Node we can set up a React project and test it conveniently using a package called create-react-app provided by Facebook, that includes all the required tools. We will explore more about it in a later section.
Merci pour vos commentaires !