Skip to content

Commit

Permalink
add a basic app
Browse files Browse the repository at this point in the history
  • Loading branch information
Karan Goel committed May 15, 2015
1 parent 80da148 commit 4dd1813
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .editorconfig
@@ -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
25 changes: 25 additions & 0 deletions 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)
2 changes: 2 additions & 0 deletions requirements.txt
@@ -0,0 +1,2 @@
flask==0.10.1
py-stackexchange==2.2.004

0 comments on commit 4dd1813

Please sign in to comment.