aboutsummaryrefslogtreecommitdiffstats
path: root/examples/example.py
diff options
context:
space:
mode:
authoripknHama <ipknhama@gmail.com>2014-08-07 01:18:33 +0900
committeripknHama <ipknhama@gmail.com>2014-08-07 01:18:33 +0900
commit031615ac866cc3c8f1900dd4b4aae2106ad31230 (patch)
treeb8b7206ffbd2043368580ec269c97436929fe452 /examples/example.py
parenta0c93f5b84cc11b30bc6320ac26127832ef8bf7a (diff)
downloadcrow-031615ac866cc3c8f1900dd4b4aae2106ad31230.tar.gz
crow-031615ac866cc3c8f1900dd4b4aae2106ad31230.zip
source resturcturing + CMake
Diffstat (limited to 'examples/example.py')
-rw-r--r--examples/example.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/examples/example.py b/examples/example.py
new file mode 100644
index 0000000..1fd8fcd
--- /dev/null
+++ b/examples/example.py
@@ -0,0 +1,19 @@
+from flask import Flask
+app = Flask(__name__)
+
+@app.route("/")
+def hello():
+ return "Hello World!"
+
+@app.route("/about/<path:path>/hello")
+def hello1(path):
+ return "about1"
+
+@app.route("/about")
+def hello2():
+ return "about2"
+
+print app.url_map
+
+if __name__ == "__main__":
+ app.run(host="0.0.0.0", port=8888)