25 questions for “RESTful API Design with Express”

Found in 1 field. Select a question to see its full answer.

Information Technology

25 questions in 1 technology

#QuestionTechnologyTopicLevel
1What is Express.js, and what problem does it solve compared to using Node.js's raw http module directly? Node.js › Express & MiddlewareNode.jsExpress & MiddlewareBeginner
2What is the difference between application-level, router-level, and route-specific middleware in Express? Node.js › Express & MiddlewareNode.jsExpress & MiddlewareIntermediate
3What does the express.json() and express.urlencoded() built-in middleware do, and why must it be registered before routes that need to read req.body? Node.js › Express & MiddlewareNode.jsExpress & MiddlewareIntermediate
4What is the difference between res.send(), res.json(), and res.end() in Express, and when should each be used? Node.js › Express & MiddlewareNode.jsExpress & MiddlewareIntermediate
5How would you set up a basic GraphQL server in Node.js using Apollo Server, and what are schema and resolvers? Node.js › GraphQL with Node.jsNode.jsGraphQL with Node.jsBeginner
6What does the URL/URLSearchParams API provide, and why is it generally preferred over the older querystring module today? Node.js › Core Node.js ModulesNode.jsCore Node.js ModulesBeginner
7What is GraphQL, and how does it differ from a traditional REST API in terms of how clients request data? Node.js › GraphQLNode.jsGraphQLBeginner
8How would you create a basic HTTP server in Node.js using only the built-in node:http module, without any framework? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersBeginner
9How would you implement a global 'not found' (404) handler in Express for any route that doesn't match a defined endpoint? Node.js › Error HandlingNode.jsError HandlingIntermediate
10What is content negotiation in HTTP, and how would a Node.js API implement it to return either JSON or XML based on a client's Accept header? Node.js › HTTP & Web ServersNode.jsHTTP & Web ServersIntermediate