Skip to content

Commit

Permalink
added GAE Flask skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-kolda committed Sep 19, 2017
1 parent 0cba16e commit 97b24f1
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.pyc

# IDE
*.iml

lib
7 changes: 7 additions & 0 deletions app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /.*
script: main.app
3 changes: 3 additions & 0 deletions appengine_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from google.appengine.ext import vendor

vendor.add('lib')
17 changes: 17 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import logging

from flask import Flask


app = Flask(__name__)


@app.route('/')
def hello():
return 'Hello World!'


@app.errorhandler(500)
def server_error(e):
logging.exception('An error occurred during a request.')
return 'An internal error occurred.', 500
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Flask==0.12.2

0 comments on commit 97b24f1

Please sign in to comment.