Express.js

Web-Framework für Node.js.

Inhalt steht zur Übersetzung an. Die englische Version wird angezeigt.

Original author: TJ Holowaychuk. Released in 2010. It is a key component of the MEAN, MERN, and MEVN stacks.

        graph LR
  Center["Express.js"]:::main
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧠 Wissenstest

1 / 1

🧒 Erkläre es wie einem 5-Jährigen

🌍 Imagine Node.js is the engine of a car. Express.js is the dashboard, the steering wheel, and the seats. It makes it much easier for a developer to 'drive' the engine and build a website without having to connect every single wire by hand.

🤓 Expert Deep Dive

Express.js operates as a thin layer atop the Node.js http module. Its core philosophy is the Middleware pattern: functions that have access to the request object (req), the response object (res), and the next middleware function. This allows for modular cross-cutting concerns (authentication, logging, parsing) to be chained sequentially. Routing in Express is highly flexible, supporting string patterns and regular expressions. While historically the performance leader, developers now weigh it against 'Next-gen' frameworks like Fastify (which uses specialized schema compilation) or Koa (developed by the same team to leverage modern async/await patterns). Security best practices for Express include the use of helmet for HTTP header protection and csurf for CSRF mitigation.

📚 Quellen