Jump to content

Express.js

From Alfawiki
Express.js
Company typeOpen-source software
IndustrySoftware development
FoundedMay 22, 2010; 16 years ago (2010-05-22)
FounderTJ Holowaychuk
Area served
Worldwide
ProductsWeb application framework for Node.js
OwnerNode.js Foundation (since 2016)
Websiteexpressjs.com

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

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>

See also

External links