MCPcopy Create free account
hub / github.com/reactive-python/reactpy / configure

Function configure

src/py/reactpy/reactpy/backend/tornado.py:40–61  ·  view source on GitHub ↗

Configure the necessary ReactPy routes on the given app. Parameters: app: An application instance component: A component constructor options: Options for configuring server behavior

(
    app: Application,
    component: ComponentConstructor,
    options: CommonOptions | None = None,
)

Source from the content-addressed store, hash-verified

38
39# BackendType.configure
40def configure(
41 app: Application,
42 component: ComponentConstructor,
43 options: CommonOptions | None = None,
44) -> None:
45 """Configure the necessary ReactPy routes on the given app.
46
47 Parameters:
48 app: An application instance
49 component: A component constructor
50 options: Options for configuring server behavior
51 """
52 options = options or Options()
53 _add_handler(
54 app,
55 options,
56 (
57 # this route should take priority so set up it up first
58 _setup_single_view_dispatcher_route(component, options)
59 + _setup_common_routes(options)
60 ),
61 )
62
63
64# BackendType.create_development_app

Callers 1

make_appFunction · 0.90

Calls 4

_add_handlerFunction · 0.85
OptionsClass · 0.70
_setup_common_routesFunction · 0.70

Tested by

no test coverage detected