Express5.1.0

Fast, unopinionated, minimalist web framework for Node.jsNode.js的快速、无偏见、极简主义的web框架

$ npm install express --save
const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => {
  res.send('Hello World!')
})

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})

Web ApplicationsWeb应用程序

Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.Express是一个最小且灵活的Node.js web应用程序框架,为web和移动应用程序提供了一组强大的功能。

APIs接口

With a myriad of HTTP utility methods and middleware at your disposal, creating a robust API is quick and easy.有了大量的HTTP实用程序方法和中间件,创建一个健壮的API既快捷又简单。

Performance性能

Express provides a thin layer of fundamental web application features, without obscuring Node.js features that you know and love.Express提供了一层薄薄的基本web应用程序功能,而不会掩盖您所知道和喜爱的Node.js功能。

Middleware中间件

Express is a lightweight and flexible routing framework with minimal core features meant to be augmented through the use of Express middleware modules.Express是一个轻量级、灵活的路由框架,具有最少的核心功能,旨在通过使用Express中间件模块进行增强。