srinuksv commited on
Commit
b59d95a
·
verified ·
1 Parent(s): 9564eb7

Create app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +11 -0
app/main.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+ from fastapi.staticfiles import StaticFiles
3
+
4
+ app = FastAPI()
5
+
6
+ # Serve the React app
7
+ app.mount("/", StaticFiles(directory="frontend/build", html=True), name="static")
8
+
9
+ @app.get("/api")
10
+ async def root():
11
+ return {"message": "Hello from FastAPI"}