From fb750d9434bf97eba6c3f2e21106b63a324d8622 Mon Sep 17 00:00:00 2001 From: Evan Brown Date: Thu, 11 Jul 2013 18:00:48 -0700 Subject: [PATCH] Implement Hello world --- .gitignore | 2 ++ README.md | 1 + application.py | 14 ++++++++++++++ requirements.txt | 1 + 4 files changed, 18 insertions(+) create mode 100644 .gitignore create mode 100644 application.py create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f426d66 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +release/ +*.pyc \ No newline at end of file diff --git a/README.md b/README.md index d25bf8a..cb4ecf2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ eb-python-flask =============== +Simple Python and Flask sample application from [AWS Elastic Beanstalk Developer Guide](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Python_flask.html) diff --git a/application.py b/application.py new file mode 100644 index 0000000..cbc6f99 --- /dev/null +++ b/application.py @@ -0,0 +1,14 @@ +import flask + +application = flask.Flask(__name__) + +#Set application.debug=true to enable tracebacks on Beanstalk log output. +#Make sure to remove this line before deploying to production. +application.debug=True + +@application.route('/') +def hello_world(): + return "Hello world!" + +if __name__ == '__main__': + application.run(host='0.0.0.0', debug=True) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..56eeb0c --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +Flask==0.10.1 \ No newline at end of file