Closed fourjr closed 6 years ago
@fourjr You can wrap the application to execute code on startup.
Here is an example:
` from japronto import Application
class App(Application):
def run(self, *args, **kwargs):
print("Code has been executed")
Application.run(self, *args, **kwargs)
def hello(request): return request.Response(text='Hello world!')
app = App() app.router.add_route('/', hello) app.run(debug=True) `
Hope that helps!
Oh ok thanks!
Title ^^