12inline constexpr uint64_t sessionLifeTime = 10 * 60 * 1'000'000'000ULL;
16inline constexpr std::chrono::duration<uint32_t> sessionCheckPeriod(60);
18inline const std::string webFrameworkDefaultAssests =
"WebFrameworkAssets";
20inline constexpr std::string_view webFrameworkDynamicPagesExtension =
".wfdp";
22inline constexpr size_t defaultChunkSize = 14 * 1024 * 1024;
24namespace json_settings
26 inline constexpr std::string_view webServerObject =
"WebServer";
27 inline constexpr std::string_view webFrameworkObject =
"WebFramework";
28 inline constexpr std::string_view httpsObject =
"HTTPS";
29 inline constexpr std::string_view loggingObject =
"Logging";
30 inline constexpr std::string_view threadPoolServerObject =
"ThreadPoolServer";
31 inline constexpr std::string_view loadBalancerObject =
"LoadBalancer";
32 inline constexpr std::string_view proxyObject =
"Proxy";
34 inline constexpr std::string_view settingsPathsKey =
"settingsPaths";
35 inline constexpr std::string_view ipKey =
"ip";
36 inline constexpr std::string_view portKey =
"port";
37 inline constexpr std::string_view timeoutKey =
"timeout";
38 inline constexpr std::string_view loadSourcesKey =
"loadSources";
39 inline constexpr std::string_view assetsPathKey =
"assetsPath";
40 inline constexpr std::string_view templatesPathKey =
"templatesPath";
41 inline constexpr std::string_view cachingSize =
"cachingSize";
42 inline constexpr std::string_view dateFormatKey =
"dateFormat";
43 inline constexpr std::string_view logFileSizeKey =
"logFileSize";
44 inline constexpr std::string_view logFlagsKey =
"flags";
45 inline constexpr std::string_view webServerTypeKey =
"webServerType";
46 inline constexpr std::string_view useHTTPSKey =
"useHTTPS";
47 inline constexpr std::string_view pathToCertificateKey =
"pathToCertificate";
48 inline constexpr std::string_view pathToKey =
"pathToKey";
49 inline constexpr std::string_view webFrameworkDefaultAssetsPath =
"defaultAssetsPath";
51 inline constexpr std::string_view listOfServersKey =
"listOfServers";
52 inline constexpr std::string_view heuristicKey =
"heuristic";
53 inline constexpr std::string_view loadSourceKey =
"loadSource";
54 inline constexpr std::string_view serversHTTPSKey =
"serversHTTPS";
56 inline constexpr std::string_view usingLoggingKey =
"usingLogging";
57 inline constexpr std::string_view logsPathKey =
"logsPath";
58 inline constexpr std::string_view duplicateOutputKey =
"duplicateOutput";
59 inline constexpr std::string_view duplicateErrorOutputKey =
"duplicateErrorOutput";
61 inline constexpr std::string_view defaultLoadSourceValue =
"current";
63 inline constexpr std::string_view threadCountKey =
"threadCount";
65 inline constexpr std::string_view multiThreadedWebServerTypeValue =
"multiThreaded";
66 inline constexpr std::string_view threadPoolWebServerTypeValue =
"threadPool";
67 inline constexpr std::string_view loadBalancerWebServerTypeValue =
"loadBalancer";
68 inline constexpr std::string_view proxyWebServerTypeValue =
"proxy";
73 inline constexpr std::string_view notImplemented =
"Not implemented";
74 inline constexpr std::string_view fileDoesNotExist =
"file does not exist";
75 inline constexpr std::string_view cantFindFunction =
"Can't find ";
76 inline constexpr std::string_view useMacroToMakeCreationFunction =
"Make sure that you add DECLARE_EXECUTOR macro for executor class";
77 inline constexpr std::string_view missingLoadType =
"Missing load type of ";
78 inline constexpr std::string_view cantLoadSource =
"Can't load ";
79 inline constexpr std::string_view missingOtherDLLs =
"That load source requires to load other dlls";
81 inline const std::string wrongWebServerType =
"Wrong type of webServerType option";
83 inline constexpr std::string_view variableDeclarationSyntaxError =
"Wrong variable declaration";
84 inline constexpr std::string_view sectionDeclarationSyntaxError =
"Wrong section declaration";
85 inline constexpr std::string_view missingSemicolonSyntaxError =
"Missing semicolon";
87 inline constexpr std::string_view stringConversionErrorCode =
"String conversion error code ";
89 inline constexpr std::string_view notFound =
"Not found";
90 inline constexpr std::string_view badRequest =
"Bad request from client";
93namespace json_settings_values
95 inline constexpr std::string_view initializationLoadTypeValue =
"initialization";
96 inline constexpr std::string_view dynamicLoadTypeValue =
"dynamic";
99namespace web_framework_assets
101 inline constexpr std::string_view errorsFolder =
"Errors";
103 inline constexpr std::string_view badRequest =
"400.html";
104 inline constexpr std::string_view notFound =
"404.html";
105 inline constexpr std::string_view internalServerError =
"500.html";
108#ifdef WEB_FRAMEWORK_DLL
110#define WEB_FRAMEWORK_API __attribute__((visibility("default")))
112#define WEB_FRAMEWORK_API __declspec(dllexport)
114#pragma warning(disable: 4275)
115#pragma warning(disable: 4251)
118#define WEB_FRAMEWORK_API