Interview Q&A / Node.js

INTERVIEW Q&A · 68 QUESTIONS

Node.js interview questions

The event loop on the server, streams, modules and building APIs with Express.

  1. How do you serve static files such as images and CSS in Express?

    Use the built-in express.static middleware with a folder path. Files inside that folder are served directly by URL, and you can add a prefix and caching options.

    BeginnerQuick answer1 min read