mirror of
https://github.com/OpenMTC/OpenMTC.git
synced 2024-12-29 17:28:58 +00:00
13 lines
311 B
Python
13 lines
311 B
Python
# Example 14b: Invoking a FlaskRunner with custom name
|
|
|
|
from openmtc_app.onem2m import XAE
|
|
from openmtc_app.flask_runner import FlaskRunner
|
|
|
|
class MyAE(XAE):
|
|
def _on_register(self):
|
|
pass
|
|
|
|
app_instance = MyAE(name="someAppName")
|
|
runner = FlaskRunner(app_instance)
|
|
runner.run("http://localhost:8000")
|