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.

HTH,

Seb

1 Like

Hi VTK community,

I have a similar issue with trame binding a custome endpoint (eg: http://localhost:8080/home/) to trame app index page (http://localhost:8080). Is there a quick way to achieve this?

Best regards!

Jack Shen

I’m not sure to understand what you are asking? Are you wondering how to setup a reverse proxy (apache/nginx) or something else?