2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
42#ifndef EXPRESS_WEBAPPT_H
43#define EXPRESS_WEBAPPT_H
45#include "express/WebApp.h"
47#ifndef DOXYGEN_SHOULD_SKIP_THIS
49#include "log/Logger.h"
58 template <
typename ServerT>
63 using Server = ServerT;
69 using SocketConnection =
typename Server::SocketConnection;
70 using SocketAddress =
typename Server::SocketAddress;
83 [rootRoute =
this->rootRoute](
const std::shared_ptr<web::http::
server::
Request>& req,
#define APPLICATION(req, res)
Config & getConfig() const
static constexpr int DISABLED
static constexpr int ERROR
static constexpr int FATAL
Controller(const std::shared_ptr< web::http::server::Request > &request, const std::shared_ptr< web::http::server::Response > &response)
void send(const std::string &chunk)
WebAppT(const std::string &name, const Router &router)
WebAppT(const std::string &name)
static void init(int argc, char *argv[])
static int start(const utils::Timeval &timeOut={LONG_MAX, 0})
const std::string & getInstanceName() const
std::string toString(bool expanded=true) const override
void listen(uint16_t port, const std::function< void(const SocketAddress &, core::socket::State)> &onStatus) const
void getAttribute(const std::function< void(Attribute &)> &onFound, const std::function< void(const std::string &)> &onNotFound, const std::string &subKey="") const
int main(int argc, char *argv[])