Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8acd8da

Browse files
authored
Create App Engine: 3 Ways: Challenge Lab Updated
1 parent 89a035f commit 8acd8da

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
command 1:
2+
3+
4+
export MESSAGE=""
5+
6+
Command 2:
7+
8+
9+
gcloud services enable appengine.googleapis.com
10+
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
11+
cd python-docs-samples/appengine/standard_python3/hello_world
12+
gcloud app deploy
13+
rm -f main.py
14+
cat > main.py << EOF
15+
16+
from flask import Flask
17+
18+
app = Flask(__name__)
19+
20+
@app.route("/")
21+
def hello():
22+
return "$MESSAGE"
23+
24+
if __name__ == "__main__":
25+
app.run(host="127.0.0.1", port=8080, debug=True)
26+
27+
EOF
28+
gcloud app deploy
29+
echo -e "\033[32mNow type Y then enter again enter then type N when asked\033[0m"
30+
gcloud compute ssh "lab-setup"
31+
32+
33+
34+
Command 3:
35+
36+
37+
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
38+
cd python-docs-samples/appengine/standard_python3/hello_world
39+
exit

0 commit comments

Comments
 (0)