Spaces:
Paused
Paused
Commit ·
d2a417a
1
Parent(s): bce56aa
-- Renew command, ngrok, startup shell file
Browse files- app.py +4 -0
- command.sh +1 -1
- ngrok.sh +1 -1
- startup.sh +1 -1
app.py
CHANGED
|
@@ -9,3 +9,7 @@ def greet_json():
|
|
| 9 |
@app.get("/testing")
|
| 10 |
def testing_json():
|
| 11 |
return {"Testing": "Testing Value"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
@app.get("/testing")
|
| 10 |
def testing_json():
|
| 11 |
return {"Testing": "Testing Value"}
|
| 12 |
+
|
| 13 |
+
@app.get("/new")
|
| 14 |
+
def new_json():
|
| 15 |
+
return {"New": "New Value"}
|
command.sh
CHANGED
|
@@ -2,4 +2,4 @@ cd python_flask
|
|
| 2 |
python3 -m venv venv
|
| 3 |
. venv/bin/activate
|
| 4 |
pip3 install -r requirements.txt
|
| 5 |
-
|
|
|
|
| 2 |
python3 -m venv venv
|
| 3 |
. venv/bin/activate
|
| 4 |
pip3 install -r requirements.txt
|
| 5 |
+
uvicorn app:app --reload
|
ngrok.sh
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
ngrok http
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
ngrok http 8000
|
startup.sh
CHANGED
|
@@ -7,4 +7,4 @@ echo "Script name $script resides in $basename directory."
|
|
| 7 |
cd "${basename}"
|
| 8 |
|
| 9 |
. venv/bin/activate
|
| 10 |
-
|
|
|
|
| 7 |
cd "${basename}"
|
| 8 |
|
| 9 |
. venv/bin/activate
|
| 10 |
+
uvicorn app:app --reload
|