<Number>Port number for the Mocks Server to be listening.
<String>Host for the server. Default is "0.0.0.0" (Listen to any local host).
<String>Logs level. Can be one of "silly", "debug", "verbose", "info", "warn", "error".
<Boolean>Watch behaviors folder and restart server on changes. Default is
<String>Default selected behavior when server is started.
<NumberResponses delay time in milliseconds.
Path as <String>Path to a folder containing behaviors to be used by the server.
<Boolean>Search for behaviors recursively in subfolders. Watch is not affected by this option, it is always recursive.
<Boolean>Start interactive CLI. Default is
Supposing you have a
mocks-server script added to your
package.json file, as seen in the get started chapter, you can define options directly in the npm script:
Or you can pass options when calling to the npm command:
Note the usage of two double dashes. Anything after the first double dashes is not an option of npm, but a parameter for the script that npm executes.