Search code examples
node.jsconsolehttp-get

What does GET /bla - - ms - - mean in NodeJs console?


When I go to the page /bla in my NodeJS app, the console prints out

GET /bla - - ms - -

In words (for easier Google searches), dash dash ms dash dash.

What does this mean?


Solution

  • This is the output from morgan, a HTTP request logger middleware for node.js.

    It logs all requests, by default, to the console. Depending on your configurations it will display different data from the request.

    If you are using the default format (dev), the data displayed is:

    :method :url :status :response-time ms - :res[content-length]