json-server
json-server copied to clipboard
feat(cli): add --delay/-d option
Adds an optional --delay (-d short) option to the CLI to delay responses.
Changes:
- added a global middleware in
app.jswith asetTimeoutthat invokesnextafter the specified delay duration. - updated the executable
binlogic to accept the '--delay' flag and pass it down to thecreateAppfunction.