Alirezamp commited on
Commit
50d45a1
·
verified ·
1 Parent(s): d629bf6

Upload main.py

Browse files
Files changed (1) hide show
  1. main.py +12 -0
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"}