Permalink
Browse files

add a basic app

  • Loading branch information...
1 parent 80da148 commit 4dd1813d74261c19b3d93f2d3784fdfa26f2a1b3 @karan committed May 15, 2015
Showing with 58 additions and 0 deletions.
  1. +31 −0 .editorconfig
  2. +25 −0 app.py
  3. +2 −0 requirements.txt
View
@@ -0,0 +1,31 @@
+# top-most EditorConfig file
+root = true
+
+# Unix-style newlines with a newline ending every file
+[*]
+end_of_line = lf
+insert_final_newline = true
+
+# Matches multiple files with brace expansion notation
+# Set default charset
+[*.{js,py}]
+charset = utf-8
+
+# 4 space indentation
+[*.py]
+indent_style = space
+indent_size = 4
+
+# Tab indentation (no size specified)
+[Makefile]
+indent_style = tab
+
+# Indentation override for all JS under lib directory
+[lib/**.js]
+indent_style = space
+indent_size = 2
+
+# Matches the exact files either package.json or .travis.yml
+[{package.json,.travis.yml}]
+indent_style = space
+indent_size = 2
View
25 app.py
@@ -0,0 +1,25 @@
+from flask import Flask, request, Response
+app = Flask(__name__)
+
+
+@app.route('/overflow', methods=['post'])
+def overflow():
+ '''
+ Example:
+ /overflow hello world
+ '''
+ user_id = request.values.get('user_id')
+ user_name = request.values.get('user_name')
+ channel_name = request.values.get('channel_name')
+ text = request.values.get('text')
+
+ return Response(text, content_type='text/plain; charset=utf-8')
+
+
+@app.route('/')
+def hello():
+ return 'Hello World!'
+
+
+if __name__ == '__main__':
+ app.run(debug=True)
View
@@ -0,0 +1,2 @@
+flask==0.10.1
+py-stackexchange==2.2.004

0 comments on commit 4dd1813

Please sign in to comment.