Inquirer CLI
plugin-inquirer-cli
The Mocks Server main distribution includes the inquirer-cli plugin preinstalled. It provides an interactive CLI that allows to change the server settings while it is running, displays server logs, etc.
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 to change settings while the server is running.
npm run mocks
Options
cli
:<String>
Start interactive CLI or not. Default istrue
. Usefalse
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 routes
or mocks
files and any file contains an error.
Alerts are displayed as:
info
As Mocks Server includes hot reloading, the alert will automatically disappear when the error is fixed.
Support
The Inquirer library is used for displaying the interactive CLI. You can consult its OS Terminals support here.