Skip to content

Controllers

codoo makes it easy for you to generate controller with a simple command.

Check bellow

codoo controller --help
python3 -m codoo controller --help

1. Generate controller

codoo controller generate
python3 -m controller generate

This command will ask questions about your new controller.

Note: All questions are mandatory.

Question Description
Controlelr name The name for your controller
Destination addons The name of the addon you created. Click here to create new Addon if you haven't created one yet
Add routes You will be asked if you want routes, click y to accept or n to to continue without routes
Route name The name of the route
Route auth The route auth public (Default) or user
Route type The route type http (Default) or json

You can add as many routes as you want by repeating the preview Add routes step in the table.

A confirmation will apear choose y to continue or n to abort.

Back to top