Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SayesCode authored Nov 7, 2024
1 parent 59d9c24 commit 7e28068
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/onyconnect/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import os
from tor_config import generate_onion_service
import uvicorn
import logging

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
app = FastAPI()

# Definindo o caminho para os diretórios 'static' e 'templates'
Expand Down Expand Up @@ -36,7 +38,7 @@ async def generate_service(request: Request, port: str = Form(...)):
# Retornando a resposta com a mensagem para a página
return templates.TemplateResponse("index.html", {"request": request, "message": message})

print('Abra: http://localhost:8000')
logging.info('Abra: http://localhost:8000')

if __name__ == "__main__":
uvicorn.run("main:app", host="127.0.0.1", port=8000, reload=True)

0 comments on commit 7e28068

Please sign in to comment.