trame: add custom endpoint

For my trame-based application, I want to simply add an endpoint so that the user can get/post that endpoint url and get some computed value.

For example, if my server is running on localhost:8080, I want to register a callback so that if the user accesses localhost:8080/get_results, it’ll call a Python function which will return some custom results.

Any suggestions for doing that? thanks!

You can add new route endpoints by doing something similar to that.



1 Like