Graded Quiz :D Post published. View post Dismiss this notice. Add titleeveloping Back-End Apps with Node.js and Express (Cloud Application Development Foundations Specialization) Answers 2025
1. Disadvantage of manual XML parsing — string matching may be more efficient than what?
❌ XML root element
❌ String matching is never more efficient
❌ XML attribute structure
✅ An XML tree of the data
Explanation:
Building and traversing an XML tree (DOM parsing) can be expensive.
Simple string matching may be faster for small or simple XML.
2. Authentication type commonly used for password recovery magic link
❌ Token-based
❌ Session-based
✅ Passwordless
❌ Single Sign-On
Explanation:
Magic links = passwordless authentication, often used for login or recovery.
3. Term describing starting a server and binding to a port
❌ http.name
✅ app.listen
❌ http.view
❌ app.request
Explanation:app.listen(port) starts the server in Express/Node.js.
4. Node.js lacks many web-app features. Developers extend it using?
❌ JavaScript
❌ Timely updates
❌ JSON
✅ External libraries and packages
Explanation:
Node relies on npm packages for routing, DBs, authentication, testing, etc.
5. True statement about jsonwebtoken.verify()
❌ Returns a response
✅ Verifies a JSON Web Token
❌ Generates a JWT
❌ Returns HTTP status code
Explanation:jwt.verify(token) checks token validity and decodes payload.
6. Express’s app class provides what function?
❌ Lookup web services
✅ Map to a web resource path
❌ Access a URL
❌ Parse network path
Explanation:
Express maps routes like:app.get("/home", handler).
7. Which framework is based on Node.js runtime?
❌ XML-JS
❌ Async.js
✅ Express
❌ JSON
Explanation:
Express is the most widely used Node.js web framework.
8. Which package parses XML string into JS object?
❌ Express.js
❌ Async.js
❌ XML-JS
✅ xml2js
Explanation:xml2js converts XML → JavaScript object.
9. Library + module used for black-box testing of REST APIs
✅ Mocha / SuperTest
❌ Koa / SuperTest
❌ Express / TestAPI
❌ Postman / TestAPI
Explanation:
Mocha = test framework, SuperTest = HTTP assertion library.
10. Middleware is most useful for which task?
❌ Large calculations
❌ Routing
❌ Parsing strings
✅ Error handling
Explanation:
Middleware commonly handles logging, auth, validation, and error handling.
🧾 SUMMARY TABLE
| Q# | Correct Answer |
|---|---|
| 1 | An XML tree of the data |
| 2 | Passwordless |
| 3 | app.listen |
| 4 | External libraries & packages |
| 5 | Verify a JSON web token |
| 6 | Map to a web resource path |
| 7 | Express |
| 8 | xml2js |
| 9 | Mocha / SuperTest |
| 10 | Error handling |