Express.js
| Company type | Open-source software |
|---|---|
| Industry | Software development |
| Founded | May 22, 2010 |
| Founder | TJ Holowaychuk |
Area served | Worldwide |
| Products | Web application framework for Node.js |
| Owner | Node.js Foundation (since 2016) |
| Website | expressjs |
Express.js, commonly referred to as Express, is a server-side web application framework designed for developing RESTful APIs using Node.js. Distributed as free and open-source software under the MIT License, it is widely recognized as the primary server framework within the Node.js ecosystem.
Developed by TJ Holowaychuk, Express draws inspiration from Sinatra, prioritizing a minimalist core with extensive functionality accessible through plugins. It operates as the back-end layer in well-known development stacks such as MEAN, MERN, and MEVN, working alongside MongoDB and various JavaScript front-end frameworks.
History
TJ Holowaychuk launched Express.js with its initial version released on 22 May 2010. In June 2014, control of the project was transferred to StrongLoop, which was subsequently acquired by IBM in September 2015. By January 2016, IBM entrusted Express.js to the Node.js Foundation incubator for ongoing maintenance.
Features
- Comprehensive routing capabilities
- Emphasis on optimized performance
- Built-in HTTP utilities (including redirection and caching)
- Support for asynchronous operations
Popularity
Leading organizations such as Fox Sports, PayPal, Uber, and IBM rely on Express.js within their technology stacks.
Example
The following example demonstrates a simple application that replies to HTTP GET requests with 'Hi, your request has been received' and listens on port 2000: <syntaxhighlight lang="js"> // Require Express module const express = require('express'); const app = express();
app.get('/', (req, res) => {
res.send('Hi, your request has been received');
});
app.listen(2000, () => {
console.log('listening at http://localhost:2000');
}); </syntaxhighlight>