Verifies that Optic can run your tasks and monitor traffic. When initializing Optic with your repository, the guided setup will have you run this command to validate the configuration. If there are any issues, they will be reported on the command line and in the Optic setup UI with recommendations on how to proceed. It takes the name of the task you wish to check, usually
This command takes no flags and has no options.
To check your
start task configuration use:
api check start
[optic] Checking task start Your command: node server.js --watch db.json --routes routes.json --port $PORT ✔ Starts a long running process (your API) ✔ On the host Optic assigns it $HOST (current: localhost) ✔ On the port Optic assigns it $PORT (current: 3463) Given this inboundUrl: http://localhost:3001 ✔ Optic proxy is able to start its proxy here localhost:3001 [optic] All Passed! This task is setup properly. Nice work![optic] To start this task, run: api start
If api check runs into issues validating your task, it will report them:
[optic] Checking task start Your command: echo "Setup A Valid Command to Start your API!" ✖ Starts a long running process (your API) → Your command exited early On the host Optic assigns it $HOST (current: localhost) On the port Optic assigns it $PORT (current: 3472) Given this inboundUrl: http://localhost:4000 ✖ Optic proxy is able to start its proxy here localhost:4000 → Optic could not start here: localhost:4000 [optic] Some checks failed. Review the documentation here: https://useoptic.com/docs/get-started/config
Having trouble? Open an issue on GitHub
Have an idea for changing this command? Here's where it lives in the repo. PRs welcome!
Need help or want to talk with us about a use case? Join Contributing on Discord