词汇表
application
一般来说,一个或多个旨在执行特定目的操作的程序。在 Express 的上下文中,指使用 Express API 并在 Node.js 平台上运行的程序。也可能指应用对象。
🌐 In general, one or more programs that are designed to carry out operations for a specific purpose. In the context of Express, a program that uses the Express API running on the Node.js platform. Might also refer to an app object.
API
应用编程接口。在首次使用缩写时拼写全称。
🌐 Application programming interface. Spell out the abbreviation when it is first used.
Express
一个快速、无偏见、极简的 Node.js 应用网络框架。通常,偏好使用“Express”而不是“Express.js”,尽管后者也是可以接受的。
🌐 A fast, un-opinionated, minimalist web framework for Node.js applications. In general, “Express” is preferred to “Express.js,” though the latter is acceptable.
libuv
一个多平台支持库,专注于异步 I/O,主要为 Node.js 的使用而开发。
🌐 A multi-platform support library which focuses on asynchronous I/O, primarily developed for use by Node.js.
middleware
一个在 Express 路由层在最终请求处理程序之前被调用的函数,因此它位于原始请求和最终目标路由之间。关于中间件的一些细微术语:
🌐 A function that is invoked by the Express routing layer before the final request handler, and thus sits in the middle between a raw request and the final intended route. A few fine points of terminology around middleware:
var foo = require('middleware')被称为 require 或 使用 一个 Node.js 模块。然后语句var mw = foo()通常返回中间件。app.use(mw)被称为_将中间件添加到全局处理堆栈_。app.get('/foo', mw, (req, res) => { /* ... */ })被称为 将中间件添加到 “GET /foo” 处理栈。
Node.js
一个用于构建可扩展网络应用的软件平台。Node.js 使用 JavaScript 作为其脚本语言,并通过非阻塞 I/O 和单线程事件循环实现高吞吐量。参见 nodejs.org。使用说明:最初称为“Node.js”,之后称为“Node”。
🌐 A software platform that is used to build scalable network applications. Node.js uses JavaScript as its scripting language, and achieves high throughput via non-blocking I/O and a single-threaded event loop. See nodejs.org. Usage note: Initially, “Node.js,” thereafter “Node”.
开源
🌐 open-source, open source
当用作形容词时,需要用连字符;例如:“这是开源软件。” 参见 维基百科上的开源软件。
🌐 When used as an adjective, hyphenate; for example: “This is open-source software.” See Open-source software on Wikipedia.
Note
虽然通常不使用连字符来连接这个词,但我们正在使用标准的英语规则来为复合形容词添加连字符。
🌐 Although it is common not to hyphenate this term, we are using the standard English rules for hyphenating a compound adjective.
request
HTTP 请求。客户端向服务器提交 HTTP 请求消息,服务器返回响应。请求必须使用几种请求方法之一,例如 GET、POST 等。
🌐 An HTTP request. A client submits an HTTP request message to a server, which returns a response. The request must use one of several request methods such as GET, POST, and so on.
response
HTTP 响应。服务器向客户端返回 HTTP 响应消息。响应包含关于请求的完成状态信息,并且其消息体中可能还包含请求的内容。
🌐 An HTTP response. A server returns an HTTP response message to the client. The response contains completion status information about the request and might also contain requested content in its message body.
route
URL 的一部分,用于标识资源。例如,在 http://foo.com/products/id 中,“/products/id” 是路由。
🌐 Part of a URL that identifies a resource. For example, in http://foo.com/products/id, “/products/id” is the route.
router
请参阅 API 参考中的 router。
🌐 See router in the API reference.