Add click-web functionality to an existing app
Closed this issue · 1 comments
Hello,
Would you have any advice for someone trying to adapt the click-web functionality so that they could add the command routes to a website and not create an entirely new server for it?
I am trying to add it to a flask app that also has a cli where I would like to allow users to execute cli commands from the web interface, just like this project :).
I'm trying to read through the code, but would you have any pointers or tips?
Hi,
Interesting question, sorry for late reply did not notice it until now.
I have not done anything similar myself, but I would suggest looking into "create_click_web_app" function.
https://github.com/fredrik-corneliusson/click-web/blob/master/click_web/__init__.py#L34
Maybe create your own version that registers both your flask app and click web.
Let me know if you have any further questions.