Skip to content

Commit

Permalink
feat: Landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanpooniwala committed Apr 10, 2023
1 parent 08570c7 commit e9aeb1b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions server/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import os
import requests
from typing import Dict, List
from fastapi import FastAPI, Request
from fastapi.responses import RedirectResponse
from fastapi.responses import HTMLResponse
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
from fastapi.middleware.cors import CORSMiddleware
Expand Down Expand Up @@ -70,9 +71,11 @@ async def serve_spa(request: Request, rest_of_path: str):
os.mkdir("static")


@app.get("/", response_class=RedirectResponse, status_code=302)
async def redirect_pydantic():
return "/ui/login"
# get https://chainfury.framer.website/ and serve on /
@app.get("/")
async def serve_farmer():
r = requests.get("https://chainfury.framer.website/")
return HTMLResponse(content=r.text, status_code=r.status_code)


# add static files
Expand Down

0 comments on commit e9aeb1b

Please sign in to comment.