wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Node.js and Express.js Fun Challenge

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is Node.js primarily used for?

a)

Managing databases

b)

Building scalable network applications and web servers.

c)

Developing desktop software

d)

Creating mobile applications

2.

Which of the following is a feature of Node.js?

a)

Built-in support for multi-threading

b)

Synchronous file system access

c)

Single-threaded blocking model

d)

Non-blocking I/O model

3.

What does Express.js help you build?

a)

Desktop software and utilities

b)

Mobile applications and games

c)

Web applications and APIs

d)

Database management systems

4.

Which method is used to create a new Express application?

a)

createApp()

b)

express()

c)

new Express()

d)

initializeExpress()

5.

What is the default port for an Express server?

a)

4000

b)

5000

c)

8080

d)

3000

6.

Which of the following is a middleware in Express.js?

a)

body-parser

b)

morgan

c)

express-session

d)

cors

7.

What file is typically used to define dependencies in a Node.js project?

a)

config.json

b)

dependencies.json

c)

package.json

d)

node_modules.json

8.

Which command is used to install Express.js?

a)

npm install expressjs

b)

yarn add express

c)

npm add express

d)

npm install express

9.

What does the 'req' parameter represent in Express routes?

a)

The 'req' parameter is a placeholder for route parameters in Express.

b)

The 'req' parameter represents the response object in Express routes.

c)

The 'req' parameter represents the request object in Express routes.

d)

The 'req' parameter is used to define middleware in Express routes.

10.

Which of the following is NOT a core module of Node.js?

a)

http

b)

fs

c)

express

d)

path