Skip to content

Commit

Permalink
✨ Update starlette server (fix #34) [2]
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteApfel committed Jul 27, 2022
1 parent 02e02f7 commit 695f916
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions p2proxy/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

from hypercorn import Config
from hypercorn.asyncio import serve
from server import router
from server import routes
from starlette.applications import Starlette

app = Starlette()

app.mount("", router)
app = Starlette(routes=routes)

if __name__ == "__main__":
config = Config()
Expand Down
2 changes: 1 addition & 1 deletion p2proxy/server/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from server.proxy import router
from .proxy import routes
4 changes: 1 addition & 3 deletions p2proxy/server/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import validators
from starlette.requests import Request
from starlette.responses import HTMLResponse, RedirectResponse
from starlette.routing import Route, Router

router = Router()
from starlette.routing import Route


async def ref_redirect_vk(request: Request):
Expand Down

0 comments on commit 695f916

Please sign in to comment.