Improved service providing and app hosting
This commit is contained in:
@@ -2,6 +2,7 @@ from tests_dev.program import Program
|
||||
|
||||
if __name__ == '__main__':
|
||||
program = Program()
|
||||
program.create_application_host()
|
||||
program.create_configuration()
|
||||
program.create_services()
|
||||
program.main()
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from typing import Optional
|
||||
|
||||
from sh_edraft.hosting import ApplicationHost
|
||||
from sh_edraft.hosting.base.application_base import ApplicationBase
|
||||
from sh_edraft.hosting.base import ApplicationBase
|
||||
|
||||
|
||||
class Program(ApplicationBase):
|
||||
@@ -7,15 +9,16 @@ class Program(ApplicationBase):
|
||||
def __init__(self):
|
||||
ApplicationBase.__init__(self)
|
||||
|
||||
self._app_host: Optional[ApplicationHost] = None
|
||||
|
||||
def create_application_host(self):
|
||||
self._app_host = ApplicationHost('CPL_DEV_Test')
|
||||
self._config = self._app_host.services.config
|
||||
self._services = self._app_host.services
|
||||
|
||||
def create_configuration(self):
|
||||
self._config.create()
|
||||
self._app_host.configuration.create()
|
||||
|
||||
def create_services(self):
|
||||
self._services.create()
|
||||
self._app_host.services.create()
|
||||
|
||||
def main(self):
|
||||
print('RUN')
|
||||
|
||||
Reference in New Issue
Block a user