diff options
author | ipknHama <ipknhama@gmail.com> | 2014-04-10 08:17:08 +0900 |
---|---|---|
committer | ipknHama <ipknhama@gmail.com> | 2014-04-10 08:17:08 +0900 |
commit | b33c7a4f2957d4468afc1e7c4463189e180c8daa (patch) | |
tree | b3914100d8d6c888829645b0a98794d6e08dce7d /example.cpp | |
parent | d533a619c99c5ead31e86afd14dd9b017c63a9ab (diff) | |
download | crow-b33c7a4f2957d4468afc1e7c4463189e180c8daa.tar.gz crow-b33c7a4f2957d4468afc1e7c4463189e180c8daa.zip |
removing black magic; merging router with app
Diffstat (limited to 'example.cpp')
-rw-r--r-- | example.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/example.cpp b/example.cpp index 9357967..c518dc4 100644 --- a/example.cpp +++ b/example.cpp @@ -2,20 +2,26 @@ #include <iostream> -flask::Flask app; - int main() { - app.route("/", - []{ + flask::Flask app; + + app.route("/") + .name("hello") + ([]{ return "Hello World!"; }); - app.route("/about", - []{ + app.route("/about") + ([]{ return "About Flask example."; }); + //app.route("/hello/<int>"); + //([]{ + //return "About Flask example."; + //}); + app.port(8080) .run(); } |