【问题标题】:How to add a timestamp to nodemon?如何为nodemon添加时间戳?
【发布时间】:2017-11-07 18:31:19
【问题描述】:

我看到了所有请求,但我想添加一个时间戳来查看每个请求是什么时候发生的。我怎样才能做到这一点?

【问题讨论】:

标签: node.js nodemon


【解决方案1】:

使用名为 nodemon.json 的 nodemon 配置文件来打印时间戳:

{
  "events": {
    "start": "date"
  }
}

并在运行nodemon时指定配置文件nodemon --config nodemon.json server.js。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-31
    • 1970-01-01
    • 2014-12-12
    • 1970-01-01
    • 1970-01-01
    • 2021-12-14
    • 2012-05-27
    相关资源
    最近更新 更多