aboutsummaryrefslogtreecommitdiffstats
path: root/example.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'example.cpp')
-rw-r--r--example.cpp18
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();
}