Websocket
Chimera supports a variety of flags to help you customize and control how the mock websocket
API behaves.
Basic Flags
Section titled “Basic Flags”--path <file>
Section titled “--path <file>”Path to your data.json
or schema.json
file.
chimera-cli --path ./data.json websocket
--quiet
Section titled “--quiet”Run without any log generation
chimera-cli --path data.json --quiet websocket
Directoryproject/
- data.json
- chimera.log.2025-08-03
- chimera.log.2025-08-04
- chimera.log.2025-08-05
--port <number>
Section titled “--port <number>”Specify the port Chimera runs on. Default is 8080
.
chimera-cli --path data.json websocket --port 3000
Pagination
Section titled “Pagination”--page <number>
Section titled “--page <number>”Enable pagination for large datasets. This sets the default number of items per page.
chimera-cli --path data.json websocket --page 10
Sorting
Section titled “Sorting”--sort <route> <asc|desc> <attribute_in_route>
Section titled “--sort <route> <asc|desc> <attribute_in_route>”Sort a specific route’s array by a key. Example:
chimera-cli --path data.json websocket --sort api/v2/data asc id
Data AutoGeneration
Section titled “Data AutoGeneration”--auto_generate_data
Section titled “--auto_generate_data”Use a schema definition to generate data.
chimera-cli --path ./schema.json websocket --auto_generate_data
Refer to Data Auto-Generation for Data Auto-Generation. Use a sample schema.json
here
Server Behavior
Section titled “Server Behavior”--cors
Section titled “--cors”Directoryproject/
- data.json
- chimera.cors
chimera-cli --path data.json websocket --cors
CORS is enabled by default (allows all domains). Use this flag to allow only certain domains by adding only the allowed domains in a chimera.cors
file. Use this sample chimera.cors
here
--help
Section titled “--help”Show all available flags for websocket
.
chimera-cli websocket --help