-
from blacksheep import Application
from blacksheep.server.controllers import Controller, get
app = Application()
class Foo(Controller):
@get('/')
def bar():
return 'whatever' can you see what confuses me here? how the bar method in Foo class is considered a request handler for app? (I meant how is it technically possible) what if I had two Application instances? is it required to only have one? |
Beta Was this translation helpful? Give feedback.
Answered by
amirongit
Oct 14, 2023
Replies: 1 comment 2 replies
-
there is a singleton router which all the controllers use to register their routes. (in case anybody came across this question) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
amirongit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
there is a singleton router which all the controllers use to register their routes. (in case anybody came across this question)