Initial commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import uvicorn
|
||||
|
||||
from config import conf
|
||||
from core.app import app
|
||||
|
||||
"""
|
||||
This is the main entry point for the application.
|
||||
"""
|
||||
|
||||
# import dynamic middleware in the modules
|
||||
for i in conf.dependency.middleware:
|
||||
__import__(f'{i}.middleware')
|
||||
|
||||
# import dynamic routes in the modules
|
||||
for i in conf.dependency.routes:
|
||||
__import__(f'{i}.urls')
|
||||
if os.path.exists(Path(f'{i}/hooks')):
|
||||
__import__(f'{i}.hooks')
|
||||
|
||||
# conf.load_modules_config()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
uvicorn.run(app, host="0.0.0.0", port=conf.server.port)
|
||||
Reference in New Issue
Block a user