mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
28 lines
380 B
C++
28 lines
380 B
C++
#include "flask.h"
|
|
|
|
#include <iostream>
|
|
|
|
int main()
|
|
{
|
|
flask::Flask app;
|
|
|
|
app.route("/")
|
|
.name("hello")
|
|
([]{
|
|
return "Hello World!";
|
|
});
|
|
|
|
app.route("/about")
|
|
([]{
|
|
return "About Flask example.";
|
|
});
|
|
|
|
//app.route("/hello/<int>");
|
|
//([]{
|
|
//return "About Flask example.";
|
|
//});
|
|
|
|
app.port(8080)
|
|
.run();
|
|
}
|