WorksheetsNode.js and Express.js Fun Challenge
Total questions: 10
Worksheet time: 5mins
What is Node.js primarily used for?
Managing databases
Building scalable network applications and web servers.
Developing desktop software
Creating mobile applications
Which of the following is a feature of Node.js?
Built-in support for multi-threading
Synchronous file system access
Single-threaded blocking model
Non-blocking I/O model
What does Express.js help you build?
Desktop software and utilities
Mobile applications and games
Web applications and APIs
Database management systems
Which method is used to create a new Express application?
createApp()
express()
new Express()
initializeExpress()
What is the default port for an Express server?
4000
5000
8080
3000
Which of the following is a middleware in Express.js?
body-parser
morgan
express-session
cors
What file is typically used to define dependencies in a Node.js project?
config.json
dependencies.json
package.json
node_modules.json
Which command is used to install Express.js?
npm install expressjs
yarn add express
npm add express
npm install express
What does the 'req' parameter represent in Express routes?
The 'req' parameter is a placeholder for route parameters in Express.
The 'req' parameter represents the response object in Express routes.
The 'req' parameter represents the request object in Express routes.
The 'req' parameter is used to define middleware in Express routes.
Which of the following is NOT a core module of Node.js?
http
fs
express
path
