fix(curriculum): update Node lecture (#69702)

This commit is contained in:
Sunny Patel
2026-08-25 11:22:18 +05:30
committed by GitHub
parent 0a30d37f10
commit 58a8741ab1
@@ -285,38 +285,6 @@ For example:
node app.js
```
### Create a Node.js Project
This command creates a new Node.js project by creating a `package.json` file that tracks its details and dependencies.
```bash
npm init
```
When you run the `npm init` command, it will walk you through an interactive CLI guide for setting up the `package.json` file. It will ask you questions for the project name, description, version, etc. If you want to start with a default `package.json` file, you can use the `npm init -y` or `npm init --yes` command.
### Install a Package
To install a specific package, run:
```bash
npm install <package>
```
For example:
```bash
npm install express
```
### Install Dependencies
To install all the dependencies listed in the `package.json` file of a project, run:
```bash
npm install
```
# --questions--
## --text--
@@ -397,37 +365,37 @@ Think about the verb used by `nvm` to indicate which version should be active fo
## --text--
A new Node.js project needs to be initialized, setting up the `package.json` file to manage its dependencies and scripts. Which command is used for this purpose?
Which command runs a JavaScript file named `app.js` in the currently active Node.js runtime?
## --answers--
`npm init`
---
`npm start`
`run app.js`
### --feedback--
The command needs to create the project's foundational file for package management.
The command starts with the name of the runtime that executes the file.
---
`node init`
### --feedback--
The command needs to create the project's foundational file for package management.
`node app.js`
---
`npm install`
`nvm app.js`
### --feedback--
The command needs to create the project's foundational file for package management.
The command starts with the name of the runtime that executes the file.
---
`npm app.js`
### --feedback--
The command starts with the name of the runtime that executes the file.
## --video-solution--
1
2