Robin commited on
Commit
5a79b8b
·
1 Parent(s): 6aab2ec
Files changed (2) hide show
  1. .gitignore +1 -0
  2. app_old.py +0 -18
.gitignore CHANGED
@@ -1,3 +1,4 @@
 
1
  # Byte-compiled / optimized / DLL files
2
  __pycache__/
3
  *.py[cod]
 
1
+ .env
2
  # Byte-compiled / optimized / DLL files
3
  __pycache__/
4
  *.py[cod]
app_old.py DELETED
@@ -1,18 +0,0 @@
1
- import os
2
- from fastapi import Request, FastAPI
3
- from fastapi.staticfiles import StaticFiles
4
-
5
- app = FastAPI()
6
-
7
- # TODO: hide your API key as a space's SECRET, access it via environment variable
8
- API_KEY = os.environ.get("API_KEY")
9
-
10
- @app.post("/api/test")
11
- async def api_test(request: Request):
12
- return {
13
- "message": "This is a test",
14
- "what_you_sent": await request.json(),
15
- "my_secret_api_key": API_KEY,
16
- }
17
-
18
- app.mount("/", StaticFiles(directory="static", html=True), name="static")