{"id":81331,"date":"2020-05-12T13:42:44","date_gmt":"2020-05-12T11:42:44","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/mikroservisy-na-s-vydumka-ili-realnost"},"modified":"2020-05-12T13:42:44","modified_gmt":"2020-05-12T11:42:44","slug":"mikroservisy-na-s-vydumka-ili-realnost","status":"publish","type":"post","link":"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/mikroservisy-na-s-vydumka-ili-realnost","title":{"rendered":"Mikroteenused C++-s. Leiutis v\u00f5i reaalsus?","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043d\u0430 \u0421++. \u0412\u044b\u0434\u0443\u043c\u043a\u0430 \u0438\u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c?\" src=\"\/wp-content\/uploads\/2020\/05\/2d238ae48a153f6b6089f602ab0c88cc.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u043b \u0448\u0430\u0431\u043b\u043e\u043d (cookiecutter) \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f REST API \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430 \u0421++ \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c docker\/docker-compose \u0438 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 conan.\n<\/p>\n<p><\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0445\u0430\u043a\u0430\u0442\u043e\u043d\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0435\u043a\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0432\u0441\u0442\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0442\u043e\u043c, \u043d\u0430 \u0447\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441. \u0412\u0441\u0435 \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043f\u0438\u0441\u0430\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0439 \u0438 \u043c\u043e\u0438\u043c <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/VoidDruid\" rel=\"nofollow\">\u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0435\u043c<\/a><\/noindex> \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Python, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u0433\u0430 \u0431\u044b\u043b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u043c \u0432 \u044d\u0442\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0431\u0435\u043a\u0435\u043d\u0434\u043e\u0432, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u044f \u0432\u043e\u043e\u0431\u0449\u0435 \u044f\u0432\u043b\u044f\u043b\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u043f\u043e\u0434 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043f\u0438\u0441\u0430\u043b \u043d\u0430 \u0432\u0435\u043b\u0438\u043a\u043e\u043c \u0438 \u0443\u0436\u0430\u0441\u043d\u043e\u043c \u0421++, \u0430 Python \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u0443\u0447\u0438\u043b \u0432 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0438\u0442\u0435\u0442\u0435. <\/p>\n<p><\/p>\n<p>\u0422\u0430\u043a \u0432\u043e\u0442, \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0432\u0441\u0442\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u044b\u043b \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0438\u043d\u0433 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0445 \u043a \u043d\u0435\u043c\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0445 \u0432 \u0411\u0414. \u0418 \u043f\u043e\u0441\u043b\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043a\u0443\u0440\u0430 \u0442\u043e\u0432\u0430\u0440\u0438\u0449 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u043c\u043d\u0435, \u043a\u0430\u043a \u0421++ \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0430 \u043f\u043b\u044e\u0441\u0430\u0445. \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044f \u044d\u0442\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u0434\u0430 \u0438 \u0432\u043e\u043e\u0431\u0449\u0435, \u0436\u044e\u0440\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432 \u0432\u043e\u0441\u0442\u043e\u0440\u0433\u0435 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0443\u043c\u0435\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u041d\u0430 \u0447\u0442\u043e \u044f \u043e\u0442\u0432\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0442\u0430\u043a\u0438\u043c\u0438 \u0432\u0435\u0449\u0430\u043c\u0438 \u043d\u0430 \u0421++ \u0438 \u0441 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c\u044e \u043c\u043e\u0433\u0443 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f 20+ \u0447\u0430\u0441\u043e\u0432 \u043f\u043e\u0441\u0432\u044f\u0442\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0443, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u044f \u0441\u0442\u0440\u0443\u0441\u0438\u043b. \u041d\u0430 \u0442\u043e\u043c \u0438 \u043f\u043e\u0440\u0435\u0448\u0438\u043b\u0438 \u0438 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u0434\u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0432\u0441\u0435 \u043d\u0430 Python.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0436\u0435, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u043d\u043e\u0439 \u0441\u0430\u043c\u043e\u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u044f \u0440\u0435\u0448\u0438\u043b\u0441\u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043d\u0430 \u0421++. \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439. \u041c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 <noindex><a rel=\"nofollow\" href=\"https:\/\/pocoproject.org\/\" rel=\"nofollow\">POCO<\/a><\/noindex>, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u043b\u0430 \u043f\u043e\u0445\u0432\u0430\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439. \u0422\u0430\u043a\u0436\u0435, \u0432\u0441\u0442\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0432\u044b\u0431\u043e\u0440\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438. \u042f \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0441 Visual Studio, IAR \u0438 \u00ab\u0433\u043e\u043b\u044b\u043c\u0438\u00bb makefile. \u0418 \u043d\u0438 \u043e\u0434\u043d\u0430 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u0440\u0435\u043b\u044c\u0449\u0430\u043b\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0441\u0435\u0440\u0432\u0438\u0441 \u0432 docker-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u0422\u043e\u0433\u0434\u0430 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 cmake \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c <noindex><a rel=\"nofollow\" href=\"https:\/\/docs.conan.io\/en\/latest\/getting_started.html\" rel=\"nofollow\">conan<\/a><\/noindex>. \u042d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 <\/p>\n<p>                        <b class=\"spoiler_title\">conanfile.txt<\/b><br \/>\n                        [requires]<br \/>\npoco\/1.9.3<br \/>\nlibpq\/11.5<\/p>\n<p>[generators]<br \/>\ncmake<\/p>\n<p>\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u00abconan install .\u00bb \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u0430\u043a\u0436\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 <\/p>\n<p>                        <b class=\"spoiler_title\">CMakeLists.txt<\/b><\/p>\n<pre><code class=\"cmake\">include(build\/conanbuildinfo.cmake)\nconan_basic_setup()\ntarget_link_libraries(&lt;target_name&gt; ${CONAN_LIBS})\n<\/code><\/pre>\n<p>\n\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u044f \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 PostgreSQL, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u043d\u0435\u0439 \u0443 \u043c\u0435\u043d\u044f \u0438\u043c\u0435\u043b\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u043d\u0435\u0439 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u043d\u0430\u0448\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043d\u0430 Python. \u0418 \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u044f \u0443\u0437\u043d\u0430\u043b? \u041e\u043d\u0430 \u0435\u0441\u0442\u044c \u0432 POCO! \u041d\u043e conan \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u043d\u0430 \u0435\u0441\u0442\u044c \u0432 POCO \u0438 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0435\u0435 \u0431\u0438\u043b\u0434\u0438\u0442\u044c, \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043b\u0435\u0436\u0438\u0442 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b (\u044f \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043e\u0431 \u044d\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044f\u043c POCO). \u0410 \u0437\u043d\u0430\u0447\u0438\u0442, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. <\/p>\n<p>\u0418 \u0442\u043e\u0433\u0434\u0430 \u043c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 \u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <noindex><a rel=\"nofollow\" href=\"https:\/\/postgrespro.ru\/docs\/postgresql\/10\/libpq\" rel=\"nofollow\">libpg<\/a><\/noindex>. \u0418 \u043c\u043d\u0435 \u043d\u0435\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e \u043f\u043e\u0432\u0435\u0437\u043b\u043e, \u043e\u043d\u0430 \u0443\u0436\u0435 \u0431\u044b\u043b\u0430 \u0432 conan \u0438 \u0434\u0430\u0436\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0430\u0441\u044c \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u0430\u043b\u0430\u0441\u044c.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u0443\u043c\u0435\u044e\u0449\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b.<br \/>\n\u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441 TemplateServerApp \u043e\u0442 Poco::Util::ServerApplication \u0438 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 main.<\/p>\n<p>                        <b class=\"spoiler_title\">TemplateServerApp<\/b><\/p>\n<pre><code class=\"cpp\">#pragma once\n\n#include &lt;string&gt;\n#include &lt;vector&gt;\n#include &lt;Poco\/Util\/ServerApplication.h&gt;\n\nclass TemplateServerApp : public Poco::Util::ServerApplication\n{\n    protected:\n        int main(const std::vector&lt;std::string&gt; &amp;);\n};<\/code><\/pre>\n<p><\/p>\n<pre><code class=\"cpp\">int TemplateServerApp::main(const vector&lt;string&gt; &amp;)\n{\n    HTTPServerParams* pParams = new HTTPServerParams;\n\n    pParams-&gt;setMaxQueued(100);\n    pParams-&gt;setMaxThreads(16);\n\n    HTTPServer s(new TemplateRequestHandlerFactory, ServerSocket(8000), pParams);\n\n    s.start();\n    cerr &lt;&lt; &quot;Server started&quot; &lt;&lt; endl;\n\n    waitForTerminationRequest();  \/\/ wait for CTRL-C or kill\n\n    cerr &lt;&lt; &quot;Shutting down...&quot; &lt;&lt; endl;\n    s.stop();\n\n    return Application::EXIT_OK;\n}<\/code><\/pre>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434\u0435 main \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: \u043f\u043e\u0440\u0442, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u0447\u0435\u0440\u0435\u0434\u0438. \u0410 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435, \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0434\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0431\u0440\u0438\u043a\u0438 <\/p>\n<p>                        <b class=\"spoiler_title\">TemplateRequestHandlerFactory<\/b><\/p>\n<pre><code class=\"cpp\">class TemplateRequestHandlerFactory : public HTTPRequestHandlerFactory\n{\npublic:\n    virtual HTTPRequestHandler* createRequestHandler(const HTTPServerRequest &amp; request)\n    {\n        return new TemplateServerAppHandler;\n    }\n};<\/code><\/pre>\n<p>\u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u2014 TemplateServerAppHandler. \u0418\u043c\u0435\u043d\u043d\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0438 \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430\u0448\u0443 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0443.<\/p>\n<p>                        <b class=\"spoiler_title\">TemplateServerAppHandler<\/b><\/p>\n<pre><code class=\"cpp\">class TemplateServerAppHandler : public HTTPRequestHandler\n{\npublic:\n    void handleRequest(HTTPServerRequest &amp;req, HTTPServerResponse &amp;resp)\n    {\n        URI uri(req.getURI());\n        string method = req.getMethod();\n\n        cerr &lt;&lt; &quot;URI: &quot; &lt;&lt; uri.toString() &lt;&lt; endl;\n        cerr &lt;&lt; &quot;Method: &quot; &lt;&lt; req.getMethod() &lt;&lt; endl;\n\n        StringTokenizer tokenizer(uri.getPath(), &quot;\/&quot;, StringTokenizer::TOK_TRIM);\n        HTMLForm form(req,req.stream());\n\n        if(!method.compare(&quot;POST&quot;))\n        {\n            cerr &lt;&lt; &quot;POST&quot; &lt;&lt; endl;\n        }\n        else if(!method.compare(&quot;PUT&quot;))\n        {\n            cerr &lt;&lt; &quot;PUT&quot; &lt;&lt; endl;\n        }\n        else if(!method.compare(&quot;DELETE&quot;))\n        {\n            cerr &lt;&lt; &quot;DELETE&quot; &lt;&lt; endl;\n        }\n\n        resp.setStatus(HTTPResponse::HTTP_OK);\n        resp.setContentType(&quot;application\/json&quot;);\n        ostream&amp; out = resp.send();\n\n        out &lt;&lt; &quot;{&quot;hello&quot;:&quot;heh&quot;}&quot; &lt;&lt; endl;\n        out.flush();\n    }\n};<\/code><\/pre>\n<p>\n\u0422\u0430\u043a\u0436\u0435 \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u0448\u0430\u0431\u043b\u043e\u043d \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 PostgreSQL. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 SQL, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <i>ExecuteSQL()<\/i>. \u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c connection \u0447\u0435\u0440\u0435\u0437 <i>GetConnection()<\/i> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API libpg. (\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0442\u043e\u043c \u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044e \u044d\u0442\u0443 \u043d\u0435\u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e\u0441\u0442\u044c).<\/p>\n<p>                        <b class=\"spoiler_title\">Database<\/b><\/p>\n<pre><code class=\"cpp\">#pragma once\n\n#include &lt;memory&gt;\n#include &lt;mutex&gt;\n#include &lt;libpq-fe.h&gt;\n\nclass Database\n{\npublic:\n    Database();\n    std::shared_ptr&lt;PGconn&gt; GetConnection() const;\n    bool ExecuteSQL(const std::string&amp; sql);\n\nprivate:\n    void establish_connection();\n    void LoadEnvVariables();\n\n    std::string m_dbhost;\n    int         m_dbport;\n    std::string m_dbname;\n    std::string m_dbuser;\n    std::string m_dbpass;\n\n    std::shared_ptr&lt;PGconn&gt;  m_connection;\n};<\/code><\/pre>\n<p>\n\u0412\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0438\u0437 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0444\u0430\u0439\u043b .env<\/p>\n<p>                        <b class=\"spoiler_title\">.env<\/b><\/p>\n<pre><code class=\"bash\">DATABASE_NAME=template\nDATABASE_USER=user\nDATABASE_PASSWORD=password\nDATABASE_HOST=postgres\nDATABASE_PORT=5432<\/code><\/pre>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u043d\u0430 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/KovalevVasiliy\/cpp_rest_api_template\" rel=\"nofollow\">\u0433\u0438\u0442\u0445\u0430\u0431\u0435.<\/a><\/noindex><\/p>\n<p><img decoding=\"async\" alt=\"\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043d\u0430 \u0421++. \u0412\u044b\u0434\u0443\u043c\u043a\u0430 \u0438\u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c?\" src=\"\/wp-content\/uploads\/2020\/05\/4888af9d7bfc64ada29c368034e77a3f.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<p>\u0418 \u043d\u0430\u0441\u0442\u0430\u043b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044d\u0442\u0430\u043f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f dockerfile \u0438 docker-compose.yml. \u0421\u043a\u0430\u0436\u0443 \u0447\u0435\u0441\u0442\u043d\u043e, \u043d\u0430 \u044d\u0442\u043e \u0443\u0448\u043b\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044f \u043d\u0443\u0431, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0430 \u0438\u0437-\u0437\u0430 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u0430\u043c\u043d\u0435\u0439 conan. \u0422\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b conan \u0441\u043a\u0430\u0447\u0430\u043b, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u0438 \u043f\u043e\u0431\u0438\u043b\u0434\u0438\u043b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0435\u043c\u0443 \u043c\u0430\u043b\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u00abconan install .\u00bb, \u0435\u043c\u0443 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 -s compiler.libcxx=libstdc++11, \u0438\u043d\u0430\u0447\u0435 \u0432\u044b \u0440\u0438\u0441\u043a\u0443\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0443\u0447\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u042f \u043f\u0440\u043e\u0441\u0438\u0434\u0435\u043b \u0441 \u044d\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432, \u0438 \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u043c \u043b\u044e\u0434\u044f\u043c \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0437\u0430 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.\n<\/p>\n<p><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f docker-compose.yml, \u043f\u043e \u0441\u043e\u0432\u0435\u0442\u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0430 \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/cookiecutter\/cookiecutter\" rel=\"nofollow\">cookiecutter<\/a><\/noindex> \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0434\u043b\u044f REST API \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430 \u0421++, c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c, \u0438 \u043f\u043e\u0434\u043d\u044f\u0442\u043e\u0439 PostgreSQL, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0432\u0435\u0434\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u00abcookiecutter <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/KovalevVasiliy\/cpp_rest_api_template.git\" rel=\"nofollow\">https:\/\/github.com\/KovalevVasiliy\/cpp_rest_api_template.git<\/a><\/noindex>\u00bb. \u0410 \u0437\u0430\u0442\u0435\u043c \u00abdocker-compose up &#8212;build\u00bb.<\/p>\n<p><\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0434\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c \u043d\u0430 \u0438\u0445 \u043d\u0435\u043b\u0435\u0433\u043a\u043e\u043c \u043f\u0443\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 REST API \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u0432\u0435\u043b\u0438\u043a\u043e\u043c \u0438 \u043c\u043e\u0433\u0443\u0447\u0435\u043c, \u043d\u043e \u0442\u0430\u043a\u043e\u043c \u043d\u0435\u043f\u043e\u0432\u043e\u0440\u043e\u0442\u043b\u0438\u0432\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u043a\u0430\u043a \u0421++. <br \/>\n\u0422\u0430\u043a\u0436\u0435, \u044f \u043e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u043e\u0442 <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/252519\/\">\u044d\u0442\u0443<\/a><\/noindex> \u0441\u0442\u0430\u0442\u044c\u044e. \u0412 \u043d\u0435\u0439 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 POCO \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 REST API \u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/501330\/\">habr.com<\/a> <\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u043b \u0448\u0430\u0431\u043b\u043e\u043d (cookiecutter) \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f REST API \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430 \u0421++ \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c docker\/docker-compose \u0438 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 conan. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0445\u0430\u043a\u0430\u0442\u043e\u043d\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0435\u043a\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0432\u0441\u0442\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0442\u043e\u043c, \u043d\u0430 \u0447\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441. \u0412\u0441\u0435 \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":81332,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-81331","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u043b \u0448\u0430\u0431\u043b\u043e\u043d (cookiecutter) \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f REST API \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430 \u0421++ \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c docker\/docker-compose \u0438 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 conan. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0445\u0430\u043a\u0430\u0442\u043e\u043d\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0435\u043a\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0432\u0441\u0442\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0442\u043e\u043c, \u043d\u0430 \u0447\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441. \u0412\u0441\u0435 \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442,\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/mikroservisy-na-s-vydumka-ili-realnost\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"et_EE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043d\u0430 \u0421++. \u0412\u044b\u0434\u0443\u043c\u043a\u0430 \u0438\u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c? | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u043b \u0448\u0430\u0431\u043b\u043e\u043d (cookiecutter) \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f REST API \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430 \u0421++ \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c docker\/docker-compose \u0438 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 conan. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0445\u0430\u043a\u0430\u0442\u043e\u043d\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0435\u043a\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0432\u0441\u0442\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0442\u043e\u043c, \u043d\u0430 \u0447\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441. \u0412\u0441\u0435 \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442,\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/mikroservisy-na-s-vydumka-ili-realnost\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-05-12T11:42:44+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-05-12T11:42:44+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Mikroteenused C++-s. Fantaasia v\u00f5i reaalsus? | ProHoster","description":"Selles artiklis r\u00e4\u00e4gin, kuidas l\u00f5in malli (cookiecutter) ja seadistin keskkonna REST API teenuse kirjutamiseks C++-s, kasutades dockerit\/docker-compose'i ja pakihaldurit conan. \u00dches hackathon'is, kus osalesin tagasiside arendajana, tekkis k\u00fcsimus, millega j\u00e4rgmine mikroteenus kirjutada. K\u00f5ik, mis oli selleks hetkeks kirjutatud,","canonical_url":"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/mikroservisy-na-s-vydumka-ili-realnost","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"et_EE","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043d\u0430 \u0421++. \u0412\u044b\u0434\u0443\u043c\u043a\u0430 \u0438\u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c? | ProHoster","og:description":"\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u043b \u0448\u0430\u0431\u043b\u043e\u043d (cookiecutter) \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f REST API \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430 \u0421++ \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c docker\/docker-compose \u0438 \u043f\u0430\u043a\u0435\u0442\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 conan. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0445\u0430\u043a\u0430\u0442\u043e\u043d\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0435\u043a\u0435\u043d\u0434-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0432\u0441\u0442\u0430\u043b \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0442\u043e\u043c, \u043d\u0430 \u0447\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441. \u0412\u0441\u0435 \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442,","og:url":"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/mikroservisy-na-s-vydumka-ili-realnost","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-05-12T11:42:44+00:00","article:modified_time":"2020-05-12T11:42:44+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"81331","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 16:00:22","updated":"2022-09-30 17:33:31"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts\/81331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/comments?post=81331"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts\/81331\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/media\/81332"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/media?parent=81331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/categories?post=81331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/tags?post=81331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}