aboutsummaryrefslogtreecommitdiffstats
path: root/example.cpp
diff options
context:
space:
mode:
authoripknHama <ipknhama@gmail.com>2014-04-01 01:51:50 +0900
committeripknHama <ipknhama@gmail.com>2014-04-01 01:51:50 +0900
commit4b8c67e2300205200f4f846400d73a03cb3da854 (patch)
tree46b63650efd6952cf88a62cc0511162af54d896f /example.cpp
parent1e11a177ee6b680b55f01d6090ccd1b2e2b8c51c (diff)
downloadcrow-4b8c67e2300205200f4f846400d73a03cb3da854.tar.gz
crow-4b8c67e2300205200f4f846400d73a03cb3da854.zip
accept connections, print http request parsed information
Diffstat (limited to 'example.cpp')
-rw-r--r--example.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/example.cpp b/example.cpp
index 3b07d61..904e1ff 100644
--- a/example.cpp
+++ b/example.cpp
@@ -1,8 +1,16 @@
#include "flask.h"
+#include <iostream>
+
flask::Flask app;
int main()
{
- app.run();
+ app.route("/",
+ []{
+ return "Hello World!";
+ });
+
+ app.port(8080)
+ .run();
}