forked from segoon/upastebin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (32 loc) · 1.57 KB
/
main.cpp
File metadata and controls
37 lines (32 loc) · 1.57 KB
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
28
29
30
31
32
33
34
35
36
37
#include <userver/clients/http/component_list.hpp>
#include <userver/components/minimal_server_component_list.hpp>
#include <userver/server/handlers/ping.hpp>
#include <userver/server/handlers/tests_control.hpp>
#include <userver/testsuite/testsuite_support.hpp>
#include <userver/storages/postgres/component.hpp>
#include <userver/utils/daemon_run.hpp>
#include <userver/clients/dns/component.hpp>
#include <userver/components/fs_cache.hpp>
#include "redirect.hpp"
#include "store.hpp"
#include "retrieve_by_uuid.hpp"
#include "latest.hpp"
#include "resources.hpp"
#include "text.hpp"
int main(int argc, char* argv[]) {
auto component_list = userver::components::MinimalServerComponentList()
.Append<userver::server::handlers::Ping>()
.Append<userver::components::TestsuiteSupport>()
.AppendComponentList(userver::clients::http::ComponentList())
.Append<userver::server::handlers::TestsControl>();
component_list.Append<userver::components::Postgres>("postgres");
component_list.Append<userver::clients::dns::Component>();
component_list.Append<userver::components::FsCache>("resources-cache");
component_list.Append<upastebin::RedirectHandler>();
component_list.Append<upastebin::StoreHandler>();
component_list.Append<upastebin::RetrieveHandler>();
component_list.Append<upastebin::LatestHandler>();
component_list.Append<upastebin::TextHandler>();
component_list.Append<upastebin::ResourcesHandler>();
return userver::utils::DaemonMain(argc, argv, component_list);
}