Skip to content

Commit

Permalink
add default backend home route so people know it's running correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
abi committed Dec 4, 2023
1 parent 273aa12 commit 96d45cf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backend/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Load environment variables first
from dotenv import load_dotenv
from fastapi.responses import HTMLResponse

load_dotenv()

Expand Down Expand Up @@ -38,6 +39,13 @@
app.include_router(screenshot.router)


@app.get("/")
async def get_status():
return HTMLResponse(
content="<h3>Your backend is running correctly. Please open the front-end URL (default is http://localhost:5173) to use screenshot-to-code.</h3>"
)


def write_logs(prompt_messages, completion):
# Get the logs path from environment, default to the current working directory
logs_path = os.environ.get("LOGS_PATH", os.getcwd())
Expand Down

0 comments on commit 96d45cf

Please sign in to comment.