Express JS

Express JS

Test your Express JS knowledge with free quizzes on MyCodeSkills covering core concepts.


  1. What is Express.js?

    • A database
    • A framework for Node.js
    • A CSS library
    • A frontend framework
  2. How do you install Express.js?

    • npm install express
    • install express
    • npm add express.js
    • express init
  3. What is the primary use of Express.js?

    • Frontend design
    • Database queries
    • Server-side routing and middleware
    • Browser automation
  4. What function is used to create an Express application?

    • express.create()
    • new Express()
    • express()
    • initExpress()
  5. Which method handles HTTP GET requests?

    • app.get()
    • app.fetch()
    • app.receive()
    • app.query()
  6. What is the main purpose of express.Router()?

    • To create a new app
    • To define middleware
    • To create modular route handlers
    • To connect databases
  7. Which middleware is used to parse incoming JSON payloads?

    • express.urlencoded()
    • express.json()
    • body-parser.text()
    • multer()
  8. How do you register a custom middleware in Express?

    • app.get()
    • app.route()
    • app.use()
    • app.listen()
  9. What is the default behavior of Express when an error is thrown?

    • Sends a 500 response
    • Ignores the error
    • Crashes the app
    • Sends a 200 response
  10. Which of the following is a templating engine supported by Express?

    • Jade (Pug)
    • Handlebars
    • EJS
    • All of the above
  11. Which middleware is commonly used for security hardening in Express.js?

    • cors
    • helmet
    • logger
    • jsonwebtoken
  12. What is Passport.js mainly used for?

    • Logging
    • Routing
    • Authentication
    • Caching
  13. What does RBAC stand for?

    • Role-Based Application Controller
    • Reliable Backend Auth Code
    • Role-Based Access Control
    • Reactive Backend Access Control
  14. Which library is used for file upload in Express.js?

    • Formidable
    • Multer
    • Cors
    • Bcrypt
  15. What does res.locals store?

    • Request-scoped data
    • Environment variables
    • Session data
    • Route params