json-server icon indicating copy to clipboard operation
json-server copied to clipboard

feat(cli): add --delay/-d option

Open nashashibi opened this issue 1 year ago • 2 comments

Adds an optional --delay (-d short) option to the CLI to delay responses.

Changes:

  • added a global middleware in app.js with a setTimeout that invokes next after the specified delay duration.
  • updated the executable bin logic to accept the '--delay' flag and pass it down to the createApp function.

nashashibi avatar Feb 07 '24 04:02 nashashibi