Skip to content

Websocket

Chimera supports a variety of flags to help you customize and control how the mock websocket API behaves.

Alt text for image

Path to your data.json or schema.json file.

Terminal window
chimera-cli --path ./data.json websocket

Run without any log generation

Terminal window
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

Specify the port Chimera runs on. Default is 8080.

Terminal window
chimera-cli --path data.json websocket --port 3000

Enable pagination for large datasets. This sets the default number of items per page.

Terminal window
chimera-cli --path data.json websocket --page 10

--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:

Terminal window
chimera-cli --path data.json websocket --sort api/v2/data asc id

Use a schema definition to generate data.

Terminal window
chimera-cli --path ./schema.json websocket --auto_generate_data

Refer to Data Auto-Generation for Data Auto-Generation. Use a sample schema.json here


  • Directoryproject/
    • data.json
    • chimera.cors
Terminal window
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


Show all available flags for websocket.

Terminal window
chimera-cli websocket --help