Skip to content

Commit

Permalink
feat(rest): Update rest starting module
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiWo committed Jul 20, 2023
1 parent c646dc3 commit 580c8d4
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions duties/rest/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@
"""

from cli.arguments import ARGUMENTS
from fastapi import FastAPI
from fetcher import get_logging_config
from rest.server import RestServer
from rest.core.server import RestServer
from rest.router.main import router
from uvicorn import Config as UvicornConfig

app = FastAPI(
title="eth-duties REST API",
description="REST endpoints exposed via eth-duties",
version="v0.4.0",
)
app.include_router(router)


def start_rest_server() -> None:
"""Starts the rest server with come configuration"""
config = UvicornConfig(
"rest.endpoints:app",
"rest.app:app",
host="127.0.0.1",
port=5000,
log_config=get_logging_config(ARGUMENTS.log),
Expand Down

0 comments on commit 580c8d4

Please sign in to comment.