Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0f74abc

Browse filesBrowse files
chenyumicengelke
authored andcommitted
Added sample for using custom server. (GoogleCloudPlatform#1833)
1 parent 8b01df8 commit 0f74abc
Copy full SHA for 0f74abc

File tree

Expand file treeCollapse file tree

3 files changed

+32
-0
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+32
-0
lines changed
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# [START gae_python37_custom_runtime]
2+
runtime: python37
3+
entrypoint: uwsgi --http-socket :8080 --wsgi-file main.py --callable app --master --processes 1 --threads 2
4+
# [END gae_python37_custom_runtime]
+26Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2018 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from flask import Flask
16+
17+
app = Flask(__name__)
18+
19+
20+
@app.route('/')
21+
def main():
22+
return 'Hello, World!'
23+
24+
25+
if __name__ == '__main__':
26+
app.run(debug=True)
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
uwsgi==2.0.17.1
2+
flask==1.0.2

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.