diff options
Diffstat (limited to 'example.cpp')
-rw-r--r-- | example.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/example.cpp b/example.cpp index 2b2e268..54efccf 100644 --- a/example.cpp +++ b/example.cpp @@ -7,11 +7,16 @@ int main() flask::Flask app; FLASK_ROUTE(app, "/") - .name("hello") + .name("hello") ([]{ return "Hello World!"; }); + FLASK_ROUTE(app, "/json") + ([]{ + return "{\"message\":\"Hello, World!\"}"; + }); + FLASK_ROUTE(app, "/about") ([](){ return "About Flask example."; @@ -32,6 +37,7 @@ int main() //return flask::response(500); //}); - app.port(8080) - .run(); + app.port(18080) + .multithreaded() + .run(); } |