GET /bla - - ms - - 在 NodeJs 控制台中是什么意思?

Cod*_*ein 6 console http-get node.js

当我转到/blaNodeJS 应用程序中的页面时,控制台会打印出来

GET /bla - - ms - -
Run Code Online (Sandbox Code Playgroud)

在字(以便于谷歌搜索)dash dash ms dash dash

这是什么意思?

vic*_*ohl 2

这是morgan的输出,morgan 是 Node.js 的 HTTP 请求记录器中间件。

默认情况下,它将所有请求记录到控制台。根据您的配置,它将显示请求中的不同数据。

如果使用默认格式(dev),则显示的数据为:

:method :url :status :response-time ms - :res[content-length]
Run Code Online (Sandbox Code Playgroud)

  • 这并不能回答问题 (7认同)