QCM - als book is compiled from Stack Overflow

Quiz interactif avec 5 questions. Testez vos connaissances!

Mahmoud DEVO
Mahmoud DEVO
December 27, 2025 10 min read
QCM - als book is compiled from Stack Overflow

Quiz: QCM - als book is compiled from Stack Overflow

5 questions | Difficulté: moyen


Question 1

What is the purpose of creating a package.json for this Angular2-express project?

  • A. To define the structure and organization of the project
  • B. To create a new folder named ‘Angular2-express’
  • C. To bootstrap the node.js app
  • D. To install dependencies for the project
Voir la réponse

Réponse correcte: B

The package.json is created to define the dependencies and scripts required for this Angular2-express project.


Question 2

Which version of Node.js is recommended as a prerequisite for this tutorial?

  • A. Node.js v3.x.x or higher
  • B. Node.js v2.x.x or higher
  • C. Node.js v4.x.x or higher
  • D. Node.js v1.x.x or higher
Voir la réponse

Réponse correcte: C

The tutorial recommends Node.js v4.x.x or higher as a prerequisite.


Question 3

What is the purpose of running ‘npm install -g typescript’ in this tutorial?

  • A. To install TypeScript for the Angular2-express project
  • B. To initialize a new Git repository
  • C. To create a new folder named ‘Angular2-express’
  • D. To upgrade npm to version 3.x.x or higher
Voir la réponse

Réponse correcte: A

Running ‘npm install -g typescript’ is used to install TypeScript globally, which is required for the Angular2 project.


Question 4

What is the purpose of using body-parser in this app.js?

  • A. To define the structure and organization of the project
  • B. To create a new folder named ‘Angular2-express’
  • C. To parse incoming request bodies as JSON or URL-encoded data
  • D. To bootstrap the node.js app
Voir la réponse

Réponse correcte: B

Body-parser is used to parse incoming request bodies as JSON or URL-encoded data.


Question 5

What command is executed at the end of app.js to start the server?

  • A. node app.js
  • B. npm start
  • C. yarn start
  • D. express start
Voir la réponse

Réponse correcte: A

The server starts with ‘node app.js’.


Advertisement

In-Article Ad

Dev Mode

Share this article

Mahmoud DEVO

Mahmoud DEVO

Senior Full-Stack Developer

I'm a passionate full-stack developer with 10+ years of experience building scalable web applications. I write about Vue.js, Node.js, PostgreSQL, and modern DevOps practices.

Enjoyed this article?

Subscribe to get more tech content delivered to your inbox.

Related Articles