2014-03-30 13:53:56 +00:00
|
|
|
#include "flask.h"
|
|
|
|
|
2014-03-31 16:51:50 +00:00
|
|
|
#include <iostream>
|
|
|
|
|
2014-03-30 13:53:56 +00:00
|
|
|
int main()
|
|
|
|
{
|
2014-04-09 23:17:08 +00:00
|
|
|
flask::Flask app;
|
|
|
|
|
|
|
|
app.route("/")
|
|
|
|
.name("hello")
|
|
|
|
([]{
|
2014-03-31 16:51:50 +00:00
|
|
|
return "Hello World!";
|
|
|
|
});
|
|
|
|
|
2014-04-09 23:17:08 +00:00
|
|
|
app.route("/about")
|
|
|
|
([]{
|
2014-04-01 13:58:52 +00:00
|
|
|
return "About Flask example.";
|
|
|
|
});
|
|
|
|
|
2014-04-09 23:17:08 +00:00
|
|
|
//app.route("/hello/<int>");
|
|
|
|
//([]{
|
|
|
|
//return "About Flask example.";
|
|
|
|
//});
|
|
|
|
|
2014-03-31 16:51:50 +00:00
|
|
|
app.port(8080)
|
|
|
|
.run();
|
2014-03-30 13:53:56 +00:00
|
|
|
}
|