aboutsummaryrefslogtreecommitdiffstats
path: root/example.cpp
blob: c518dc47890271c7d290af8e20efe70043c7c3ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#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();
}