Upload main.py
Browse files
main.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from fastapi import FastAPI
|
2 |
+
|
3 |
+
app = FastAPI()
|
4 |
+
|
5 |
+
# @app.get('/')
|
6 |
+
# def read_root():
|
7 |
+
# return {"message": "Hello, World!"}
|
8 |
+
|
9 |
+
# redirect to 127.0.0.1
|
10 |
+
@app.get('/')
|
11 |
+
def redirect_to_localhost():
|
12 |
+
return {"redirect": "http://127.0.0.1:5678"}
|