Version: Next

Inquirer CLI

plugin-inquirer-cli#

The main distribution includes the inquirer-cli plugin, which provides an interactive CLI that allows to change the server settings while it is running.

Usage#

If you are using this plugin (enabled by default), you don't need to provide all your desired options using the configuration file or command line arguments when starting the server. The CLI allows you to change settings while the server is running:

npm run mocks-server

Interactive CLI

Options#

  • cli: <String> Start interactive CLI or not. Default is true. Use false to disable it.

Alerts#

The plugin will display mocks-server alerts on the top of the screen. This is very useful when you are changing fixtures or behaviors definitions, and they can't be loaded because some file contains a JavaScript error, for example.

Current alerts will be displayed as:

Interactive CLI alerts

As mocks-server includes hot reloading, the alert will automatically disappear when the error is fixed.

Support#

Inquirer is used for displaying the interactive CLI. You can consult his OS Terminals support here.