Node.js & Express Fundamentals: Building Server Applications
Node.js & Express Fundamentals: Building Server Applications
Up to 20 questions, shuffled on every run
Welcome to the Node.js & Express Fundamentals Quiz! This quiz will test your knowledge of core concepts in building server applications with Node.js and Express. From understanding the basics of Node.js and npm to mastering routing, middleware, and error handling in Express, this quiz is designed to challenge you and help you solidify your understanding of backend development with JavaScript. Whether you’re new to Node.js or looking to refresh your knowledge, this quiz is a great way to test your skills. Good luck!
Answer key and explanations20 questions
The quiz above draws 20 questions at random from these 35, so a second attempt will not be the same run. Everything in the pool is listed here.
What is Node.js?
AnswerA JavaScript runtime built on Chrome's V8 engine for server-side execution
What is npm (Node Package Manager)?
AnswerThe standard package manager used to install and manage project dependencies
What is package.json?
AnswerA manifest file declaring metadata, scripts, and required project libraries
What is Express.js?
AnswerA minimal web framework used for routing, middleware, and request handling
What is a route in Express?
AnswerThe definition of a URL endpoint and the logic used to generate a response
What are HTTP methods in Express routing?
AnswerMethods corresponding to REST operations such as GET, POST, PUT, and DELETE
What is middleware in Express?
AnswerFunctions having access to the request, response, and the next middleware cycle
What does app.use() do in Express?
AnswerRegisters a specific middleware function to be executed for incoming requests
What is req (request) object in Express?
AnswerAn object containing request data like headers, URL, body, and parameters
What is res (response) object in Express?
AnswerAn object used to send response data, status codes, and headers to the client
What is req.body in Express?
AnswerA property containing the parsed data sent in the body of the request
What is req.query in Express?
AnswerAn object containing parameters from the URL query string after the ? mark
What is req.params in Express?
AnswerAn object containing route parameters defined in the path of the URL endpoint
What is JSON in Express responses?
AnswerA method that sends a JSON response and sets the correct content-type header
What is status code in HTTP responses?
AnswerA numeric code indicating the outcome of a request such as 200, 404, or 500
What is error handling middleware in Express?
AnswerMiddleware defined with 4 parameters used to catch and handle thrown errors
What is next() in Express middleware?
AnswerA function that passes control to the next middleware function in the stack
What is CORS in Express?
AnswerMiddleware that allows or restricts cross-origin requests for the server
What is body-parser in Express?
AnswerMiddleware used to parse the incoming request body into a usable object
What is routing in Express, and how is it organized?
AnswerMapping URLs to handlers, often organized via the Router for modularity
What is the difference between .send() and .json()?
Answer.json() specifies a JSON content-type while .send() is for general data
What is environment variables in Node.js?
AnswerVariables stored in process.env used for configuration and sensitive keys
What is the purpose of npm scripts?
AnswerCommands defined in package.json to automate tasks like starting a server
What is app.listen() in Express?
AnswerA method that starts the server and begins listening for incoming requests
What is express.static() middleware?
AnswerMiddleware used to serve static files like images, CSS, and HTML documents
What is input validation in Express?
AnswerThe process of checking that incoming data matches the expected format
What is async/await in Node.js?
AnswerSyntax used to write asynchronous code in a more readable, linear fashion
What are Promises in Node.js?
AnswerObjects representing the eventual success or failure of an async operation
What is database connection in Node.js?
AnswerEstablishing a link to a database, often using pools for better efficiency
What is URL encoding in Express?
AnswerParsing data submitted from HTML forms via application/x-www-form-urlencoded
What is session management in Node.js?
AnswerStoring user-specific data across multiple requests using cookies and stores
What is REST API in Express?
AnswerAn architectural style utilizing HTTP methods to perform actions on resources
What is middleware chaining in Express?
AnswerExecuting multiple middleware in a sequence where each calls the next() function
What is the purpose of console.log in Node.js debugging?
AnswerPrints information to the terminal for debugging during the development cycle
What is the difference between require() and import?
Answerrequire() follows the CommonJS standard while import uses modern ES modules








