Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Karan Goel
committed
May 15, 2015
1 parent
80da148
commit 4dd1813
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,2 @@ | |||
flask==0.10.1 | |||
py-stackexchange==2.2.004 |