{"id":322445,"date":"2021-05-01T09:00:20","date_gmt":"2021-05-01T09:00:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=322445"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=322445","title":{"rendered":"\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u00a0\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u00a0Express.js \u0432\u202fYandex\u202fCloud\u202fFunctions"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/377\/8f9\/ef6\/3778f9ef652678b0c7a7ef2c7d741272.jpeg\" width=\"1400\" height=\"636\"><figcaption><\/figcaption><\/figure>\n<p>Node.js\u202f\u2014&nbsp;\u0443\u0434\u043e\u0431\u043d\u0430\u044f&nbsp;\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f\u202f\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u202fJavaScript. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u202f\u043d\u0435\u0435\u202f\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445&nbsp;\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432,&nbsp;\u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Express, Connect \u0438\u043b\u0438 Koa, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.&nbsp;&nbsp;&nbsp;<\/p>\n<p>\u0415\u0441\u043b\u0438&nbsp;\u0438\u0434\u0442\u0438&nbsp;\u043f\u043e \u043f\u0443\u0442\u0438 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f&nbsp;\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0436\u0435\u043b\u0430\u043d\u0438\u0435&nbsp;\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c&nbsp;\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u202fYandex&nbsp;Cloud&nbsp;Functions&nbsp;\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0437 \u043e\u0431\u043b\u0430\u043a\u0430.&nbsp;\u041a&nbsp;\u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e,\u202f\u043f\u043e\u043a\u0430 \u043d\u0435\u043b\u044c\u0437\u044f&nbsp;\u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u0432\u0437\u044f\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c&nbsp;\u0432 \u043e\u0431\u043b\u0430\u043a\u0435&nbsp;\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c\u202fnode.js-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435.\u202f\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438&nbsp;\u043f\u0438\u0448\u0443\u0442 \u043e\u0442\u0432\u0435\u0442&nbsp;\u0432\u202f\u0441\u043e\u043a\u0435\u0442&nbsp;HTTP(S).\u202f\u0420\u0430\u043d\u0442\u0430\u0439\u043c&nbsp;\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f.\u202f\u202f&nbsp;<\/p>\n<pre><code class=\"javascript\">{          \"statusCode\": &lt;HTTP \u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0430&gt;,     \"headers\": &lt;\u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432&gt;,     \"multiValueHeaders\": &lt;\u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u0430\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432&gt;,     \"body\": \"&lt;\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0442\u0432\u0435\u0442\u0430&gt;\",     \"isBase64Encoded\": &lt;true \u0438\u043b\u0438 false&gt;  }<\/code><\/pre>\n<p>\u00ab\u0418\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb&nbsp;\u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0432 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.&nbsp;\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c,&nbsp;\u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c,&nbsp;\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435\u202f\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u202fExpress.js\u202f\u0441 \u0434\u0432\u0443\u043c\u044f\u202f\u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430\u043c\u0438.\u202f&nbsp;<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c&nbsp;\u043d\u043e\u0432\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0438 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u043c \u0432 \u043d\u0435\u0439 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442:\u202f&nbsp;<\/p>\n<pre><code class=\"bash\">mkdir sample-app &amp;&amp; cd sample-app npm init -y npm install express touch index.js<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432\u202f<em>index.js\u202f<\/em>\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:\u202f&nbsp;<\/p>\n<pre><code class=\"javascript\">const express = require('express'); const app = express(); app.use(express.urlencoded({ extended: true })); app.use(express.json()); app.get('\/api\/info', (req, res) =&gt; {     res.send({ application: 'sample-app', version: '1.0' }); }); app.post('\/api\/v1\/getback', (req, res) =&gt; {     res.send({ ...req.body }); }); app.listen(3000, () =&gt; console.log(`Listening on: 3000`)); <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438&nbsp;\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e&nbsp;\u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442&nbsp;\u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b:\u202f&nbsp;<\/p>\n<pre><code class=\"bash\">$ curl 'http:\/\/localhost:3000\/api\/info' {\"application\":\"sample-app\",\"version\":\"1\"}<\/code><\/pre>\n<h2>\u0410\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u0435\u043c\u202f\u043f\u0440\u043e\u0435\u043a\u0442\u202f\u043f\u043e\u0434\u202fServerless\u202f&nbsp;<\/h2>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u043c\u202f\u043c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/www.npmjs.com\/package\/serverless-http\" rel=\"noopener noreferrer nofollow\">serverless-http<\/a>:\u202f&nbsp;<\/p>\n<pre><code class=\"bash\">npm i --save serverless-http<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439\u202f\u0432\u0440\u0430\u043f\u043f\u0435\u0440, \u043e\u043d\u202f\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e\u202fExpress, \u043d\u043e \u0438&nbsp;Connect,&nbsp;Koa,&nbsp;restana, \u0430 \u0442\u0430\u043a\u0436\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433\u0438\u0435&nbsp;\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438:&nbsp;Sails,&nbsp;Hapi,&nbsp;Fastify,&nbsp;Restify,&nbsp;Polka&nbsp;\u0438&nbsp;LoopBack.\u202f&nbsp;<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c&nbsp;\u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 \u043f\u0440\u0438\u043c\u0435\u0440.&nbsp;\u0417\u0430\u043c\u0435\u043d\u044f\u0435\u043c&nbsp;\u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430&nbsp;\u043f\u043e\u0440\u0442\u0435&nbsp;3000&nbsp;\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f\u202fserverless-\u0440\u0430\u043d\u0442\u0430\u0439\u043c\u043e\u043c\u202f\u043e\u0431\u043b\u0430\u043a\u0430:&nbsp;<\/p>\n<pre><code class=\"javascript\">const express = require('express'); const app = express(); const serverless = require('serverless-http'); app.use(express.urlencoded({ extended: true })); app.use(express.json()); app.get('\/api\/info', (req, res) =&gt; {     res.send({ application: 'sample-app', version: '1.0' }); }); app.post('\/api\/v1\/getback', (req, res) =&gt; {     res.send({ ...req.body }); }); \/\/app.listen(3000, () =&gt; console.log(`Listening on: 3000`));  module.exports.handler = serverless(app);<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0432\u202f\u043e\u0431\u043b\u0430\u043a\u0435.\u202f&nbsp;<\/p>\n<h2>\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435&nbsp;<\/h2>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0434 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435,&nbsp;\u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439&nbsp;<a href=\"https:\/\/www.serverless.com\/\" rel=\"noopener noreferrer nofollow\"><u>serverless<\/u><\/a>. \u0423\u202fYandex.Cloud\u202f\u0435\u0441\u0442\u044c&nbsp;\u0441\u0432\u043e\u0439\u202f<a href=\"https:\/\/github.com\/yandex-cloud\/serverless-plugin\" rel=\"noopener noreferrer nofollow\"><u>\u043f\u043b\u0430\u0433\u0438\u043d<\/u><\/a>,\u202f\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442&nbsp;\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c&nbsp;\u0444\u0443\u043d\u043a\u0446\u0438\u0438.\u202f\u0418\u0437 \u043d\u0435\u0433\u043e \u043f\u043e\u043a\u0430 \u043d\u0435\u043b\u044c\u0437\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2014\u202fYandex\u202fAPI&nbsp;Gateway,\u202f\u043c\u044b\u202f\u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e\u202f\u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.&nbsp;<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u202fServerless\u202fFramework\u202f\u0438 \u043f\u043b\u0430\u0433\u0438\u043d \u043a \u043d\u0435\u043c\u0443:&nbsp;<\/p>\n<pre><code class=\"bash\">npm i -g serverless serverless-yandex-cloud <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435\u202f\u0444\u0430\u0439\u043b\u202f<em>serverless.yaml<\/em>&nbsp;\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:\u202f&nbsp;&nbsp;<\/p>\n<pre><code class=\"markdown\">service: sample-app frameworkVersion: \"&gt;=1.1.0\" configValidationMode: off  provider:   name: yandex-cloud   runtime: nodejs12-preview  plugins:   - serverless-yandex-cloud  package:   exclude:     - .\/**   include:     - .\/package.json     - .\/**\/*.js  functions:   express:     # this is formatted as &lt;FILENAME&gt;.&lt;HANDLER&gt;     handler: index.handler     memory: 128     timeout: 5<\/code><\/pre>\n<p>\u0414\u0435\u043f\u043b\u043e\u0438\u043c\u202f\u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:&nbsp;<\/p>\n<pre><code class=\"bash\">serverless\u202fdeploy\u202f<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438\u202f\u0441\u0434\u0435\u043b\u0430\u0442\u044c&nbsp;\u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0435\u0435 \u043f\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c\u0443 URL, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u043f\u0443\u0442\u044c\u202f<strong>\/api\/info <\/strong>, \u0442\u043e \u0432 \u043e\u0442\u0432\u0435\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443:&nbsp;<\/p>\n<pre><code class=\"bash\">$ curl 'https:\/\/functions.yandexcloud.net\/%function-id%\/api\/info' {\"errorCode\":400,\"errorMessage\":\"Invalid functionID: \/%function-id%\/api\/info\", \"errorType\":\"ProxyIntegrationError\"}<\/code><\/pre>\n<p>&nbsp;\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 API\u202fGateway.\u202f&nbsp;<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 API\u202fGateway\u202f<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8dc\/98d\/f67\/8dc98df67e5dd5128a00d7c76f1159f7.png\" width=\"1400\" height=\"913\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c&nbsp;\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443\u202f<a href=\"http:\/\/spec.openapis.org\/oas\/v3.0.3\" rel=\"noopener noreferrer nofollow\"><u>OpenAPI&nbsp;3.0<\/u><\/a>, \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e API&nbsp;\u0435\u0435\u202f\u043c\u043e\u0436\u043d\u043e&nbsp;\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c&nbsp;\u0440\u0443\u043a\u0430\u043c\u0438:&nbsp;<\/p>\n<pre><code>openapi: 3.0.0 info:   title: Sample API   version: 1.0.0 paths:   \/api\/info:     get:       responses:         '200':           description: Ok       x-yc-apigateway-integration:         type: cloud_functions         function_id: %function_id%         tag: $latest         service_account_id: %service_account_id%   \/api\/v1\/getback:     post:       responses:         '200':           description: Ok           content:             application\/json:               schema:                 $ref: '#\/components\/schemas\/Test'       requestBody:         required: false         content:           application\/json:             schema:               $ref: '#\/components\/schemas\/Test'       x-yc-apigateway-integration:         type: cloud_functions         function_id: %function_id%         tag: $latest         service_account_id: %service_account_id%  components:   schemas:     Test:       type: object<\/code><\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435&nbsp;\u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c&nbsp;<strong><em>%function_id%<\/em><\/strong><em>&nbsp;<\/em>\u0438&nbsp;<strong><em>%service_account_id%<\/em><\/strong><em>&nbsp;<\/em>\u043d\u0430 \u0432\u0430\u0448\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0423 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0440\u043e\u043b\u044c&nbsp;<strong>serverless.functions.invoker<\/strong>&nbsp;\u0438\u043b\u0438&nbsp;\u0432\u044b\u0448\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0431\u0435\u0437 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430.&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u0412&nbsp;\u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445&nbsp;\u0441\u043b\u0443\u0447\u0430\u044f\u0445&nbsp;\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c&nbsp;\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e&nbsp;OpenAPI&nbsp;\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043a\u043e\u0434\u0430 API. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e&nbsp;\u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442&nbsp;<a href=\"https:\/\/www.npmjs.com\/package\/express-oas-generator\" rel=\"noopener noreferrer nofollow\">express-oas-generator<\/a>.&nbsp;<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438&nbsp;\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e URL.&nbsp;<\/p>\n<pre><code class=\"bash\">$ curl 'https:\/\/%api-gw-id%.apigw.yandexcloud.net\/api\/info' {\"application\":\"sample-app\",\"version\":\"1\"}<\/code><\/pre>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438,&nbsp;\u043a&nbsp;API&nbsp;Gateway&nbsp;\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0434\u043e\u043c\u0435\u043d.&nbsp;\u041a\u0430\u043a&nbsp;\u043f\u0440\u0438\u044f\u0437\u0430\u0442\u044c&nbsp;\u0434\u043e\u043c\u0435\u043d&nbsp;\u2014&nbsp;\u0447\u0438\u0442\u0430\u0439\u0442\u0435&nbsp;\u0432 \u044d\u0442\u043e\u043c&nbsp;<a href=\"https:\/\/habr.com\/ru\/post\/547134\/\" rel=\"noopener noreferrer nofollow\"><u>\u043f\u043e\u0441\u0442\u0435<\/u><\/a>.&nbsp;&nbsp;<\/p>\n<h2>\u041d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440&nbsp;API&nbsp;Gateway&nbsp;<\/h2>\n<p>\u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432&nbsp;API&nbsp;Gateway&nbsp;\u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432\u0438\u0434\u0430&nbsp;<strong><em>{param+}<\/em><\/strong>.&nbsp;\u0412&nbsp;\u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0443\u0442&nbsp;\u043c\u0430\u0442\u0447\u0438\u0442\u044c\u0441\u044f&nbsp;\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043f\u0443\u0442\u0438.&nbsp;<\/p>\n<pre><code>paths:   \/api\/{proxy+}:     get:       x-yc-apigateway-integration:         type: cloud_functions         function_id: d4e***         tag: $latest         service_account_id: aje***       responses:         200:           description: Ok       parameters:         - explode: true           in: path           name: proxy           required: true           schema:             type: string           style: simple<\/code><\/pre>\n<p>\u0412&nbsp;\u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u202f<strong>event<\/strong>\u202f\u0432&nbsp;\u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438\u202f<strong>path<\/strong>\u202f\u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c&nbsp;\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435&nbsp;\u0432\u0438\u0434\u0430\u202f<strong>\/api\/%7Bproxy+%7D<\/strong>\u202f\u0438 \u0440\u043e\u0443\u0442\u0435\u0440&nbsp;Express.js&nbsp;\u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u043c\u0430\u0442\u044c\u0441\u044f.&nbsp;<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0430:&nbsp;<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0435\u0441\u0442\u043d\u044b\u0439&nbsp;provider&nbsp;\u0434\u043b\u044f&nbsp;Yandex.Cloud&nbsp;\u043f\u043e \u043e\u0431\u0440\u0430\u0437\u0443 \u0442\u043e\u0433\u043e,&nbsp;\u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043b\u044f\u202f<a href=\"https:\/\/github.com\/dougmoscrop\/serverless-http\/tree\/master\/lib\/provider\/aws\" rel=\"noopener noreferrer nofollow\">AWS<\/a>;&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u0442\u044c&nbsp;\u043e\u0431\u044a\u0435\u043a\u0442&nbsp;<strong>event<\/strong>, \u043f\u043e\u043b\u043e\u0436\u0438\u0432 \u0432\u202f<strong>path<\/strong>\u202f\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u202f<strong>url<\/strong>&nbsp;(\u0441\u0442\u0440\u043e\u043a\u0438&nbsp;13\u201319&nbsp;\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0438\u0436\u0435).&nbsp;<\/p>\n<\/li>\n<\/ul>\n<p>&nbsp;\u041f\u0440\u0438\u043c\u0435\u0440 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430&nbsp;\u043c\u043e\u0436\u043d\u043e&nbsp;<a href=\"https:\/\/gist.github.com\/nikolaymatrosov\/bf440061f96aa8627a9e1fae0d8d3278#file-index-js\" rel=\"noopener noreferrer nofollow\"><u>\u0441\u043a\u0430\u0447\u0430\u0442\u044c<\/u><\/a>.&nbsp;&nbsp;<\/p>\n<pre><code class=\"javascript\">const express = require('express'); const serverless = require('serverless-http'); const app = express(); app.use(express.urlencoded({ extended: true })); app.use(express.json()); app.get('\/api\/info', (req, res) =&gt; {     res.send({ application: 'sample-app', version: '1.0' }); }); app.get('\/api\/pet\/:name?', (req, res) =&gt; {     res.send({ ...req.params }); });  module.exports.handler = (event, context) =&gt; {     const patchedEvent = {         ...event,         path: event.url,         originalPath: event.path,     }     return serverless(app)(patchedEvent, context); }<\/code><\/pre>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e&nbsp;\u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Express.js  \u043d\u0430 Yandex\u202fCloud\u202fFunctions&nbsp;\u043f\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435&nbsp;<a href=\"http:\/\/cloud.yandex.ru\/docs\/billing\/concepts\/serverless-free-tier?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=serverless\" rel=\"noopener noreferrer nofollow\">free&nbsp;tier<\/a>:&nbsp;\u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u0442\u0430\u0440\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442&nbsp;\u043f\u0435\u0440\u0432\u044b\u0439&nbsp;\u043c\u0438\u043b\u043b\u0438\u043e\u043d&nbsp;\u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043f\u0435\u0440\u0432\u044b\u0435 10&nbsp;\u0413\u0411\u00d7\u0447\u0430\u0441&nbsp;\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439.&nbsp;\u0410 \u043b\u044e\u0431\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b&nbsp;\u043e&nbsp;\u0440\u0430\u0431\u043e\u0442\u0435&nbsp;\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u043a\u0430\u043a \u0441 \u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u0442\u0430\u043a \u0438&nbsp;\u0441 \u0438\u0445&nbsp;\u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044f\u043c\u0438&nbsp;\u0432&nbsp;\u0447\u0430\u0442\u0435 <a href=\"https:\/\/t.me\/YandexCloudFunctions\" rel=\"noopener noreferrer nofollow\"><u>Yandex Serverless Ecosystem<\/u><\/a>.&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/555108\/\"> https:\/\/habr.com\/ru\/post\/555108\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>Node.js\u202f\u2014&nbsp;\u0443\u0434\u043e\u0431\u043d\u0430\u044f&nbsp;\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u0430\u044f\u202f\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u202fJavaScript. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\u202f\u043d\u0435\u0435\u202f\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445&nbsp;\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432,&nbsp;\u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Express, Connect \u0438\u043b\u0438 Koa, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.&nbsp;&nbsp;&nbsp;<\/p>\n<p>\u0415\u0441\u043b\u0438&nbsp;\u0438\u0434\u0442\u0438&nbsp;\u043f\u043e \u043f\u0443\u0442\u0438 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f&nbsp;\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0436\u0435\u043b\u0430\u043d\u0438\u0435&nbsp;\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c&nbsp;\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u202fYandex&nbsp;Cloud&nbsp;Functions&nbsp;\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0437 \u043e\u0431\u043b\u0430\u043a\u0430.&nbsp;\u041a&nbsp;\u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e,\u202f\u043f\u043e\u043a\u0430 \u043d\u0435\u043b\u044c\u0437\u044f&nbsp;\u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u0432\u0437\u044f\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c&nbsp;\u0432 \u043e\u0431\u043b\u0430\u043a\u0435&nbsp;\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c\u202fnode.js-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435.\u202f\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438&nbsp;\u043f\u0438\u0448\u0443\u0442 \u043e\u0442\u0432\u0435\u0442&nbsp;\u0432\u202f\u0441\u043e\u043a\u0435\u0442&nbsp;HTTP(S).\u202f\u0420\u0430\u043d\u0442\u0430\u0439\u043c&nbsp;\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f.\u202f\u202f&nbsp;<\/p>\n<pre><code class=\"javascript\">{          \"statusCode\": &lt;HTTP \u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0430&gt;,     \"headers\": &lt;\u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432&gt;,     \"multiValueHeaders\": &lt;\u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u0430\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432&gt;,     \"body\": \"&lt;\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0442\u0432\u0435\u0442\u0430&gt;\",     \"isBase64Encoded\": &lt;true \u0438\u043b\u0438 false&gt;  }<\/code><\/pre>\n<p>\u00ab\u0418\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb&nbsp;\u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0432 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.&nbsp;\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c,&nbsp;\u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c,&nbsp;\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435\u202f\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u202fExpress.js\u202f\u0441 \u0434\u0432\u0443\u043c\u044f\u202f\u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430\u043c\u0438.\u202f&nbsp;<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c&nbsp;\u043d\u043e\u0432\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0438 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u043c \u0432 \u043d\u0435\u0439 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442:\u202f&nbsp;<\/p>\n<pre><code class=\"bash\">mkdir sample-app &amp;&amp; cd sample-app npm init -y npm install express touch index.js<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432\u202f<em>index.js\u202f<\/em>\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:\u202f&nbsp;<\/p>\n<pre><code class=\"javascript\">const express = require('express'); const app = express(); app.use(express.urlencoded({ extended: true })); app.use(express.json()); app.get('\/api\/info', (req, res) =&gt; {     res.send({ application: 'sample-app', version: '1.0' }); }); app.post('\/api\/v1\/getback', (req, res) =&gt; {     res.send({ ...req.body }); }); app.listen(3000, () =&gt; console.log(`Listening on: 3000`)); <\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438&nbsp;\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e&nbsp;\u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442&nbsp;\u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b:\u202f&nbsp;<\/p>\n<pre><code class=\"bash\">$ curl 'http:\/\/localhost:3000\/api\/info' {\"application\":\"sample-app\",\"version\":\"1\"}<\/code><\/pre>\n<h2>\u0410\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u0435\u043c\u202f\u043f\u0440\u043e\u0435\u043a\u0442\u202f\u043f\u043e\u0434\u202fServerless\u202f&nbsp;<\/h2>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u043c\u202f\u043c\u043e\u0434\u0443\u043b\u044c <a href=\"https:\/\/www.npmjs.com\/package\/serverless-http\" rel=\"noopener noreferrer nofollow\">serverless-http<\/a>:\u202f&nbsp;<\/p>\n<pre><code class=\"bash\">npm i --save serverless-http<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439\u202f\u0432\u0440\u0430\u043f\u043f\u0435\u0440, \u043e\u043d\u202f\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e\u202fExpress, \u043d\u043e \u0438&nbsp;Connect,&nbsp;Koa,&nbsp;restana, \u0430 \u0442\u0430\u043a\u0436\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433\u0438\u0435&nbsp;\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438:&nbsp;Sails,&nbsp;Hapi,&nbsp;Fastify,&nbsp;Restify,&nbsp;Polka&nbsp;\u0438&nbsp;LoopBack.\u202f&nbsp;<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c&nbsp;\u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 \u043f\u0440\u0438\u043c\u0435\u0440.&nbsp;\u0417\u0430\u043c\u0435\u043d\u044f\u0435\u043c&nbsp;\u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430&nbsp;\u043f\u043e\u0440\u0442\u0435&nbsp;3000&nbsp;\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f\u202fserverless-\u0440\u0430\u043d\u0442\u0430\u0439\u043c\u043e\u043c\u202f\u043e\u0431\u043b\u0430\u043a\u0430:&nbsp;<\/p>\n<pre><code class=\"javascript\">const express = require('express'); const app = express(); const serverless = require('serverless-http'); app.use(express.urlencoded({ extended: true })); app.use(express.json()); app.get('\/api\/info', (req, res) =&gt; {     res.send({ application: 'sample-app', version: '1.0' }); }); app.post('\/api\/v1\/getback', (req, res) =&gt; {     res.send({ ...req.body }); }); \/\/app.listen(3000, () =&gt; console.log(`Listening on: 3000`));  module.exports.handler = serverless(app);<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0443 \u0432\u202f\u043e\u0431\u043b\u0430\u043a\u0435.\u202f&nbsp;<\/p>\n<h2>\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435&nbsp;<\/h2>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u0434 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435,&nbsp;\u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439&nbsp;<a href=\"https:\/\/www.serverless.com\/\" rel=\"noopener noreferrer nofollow\"><u>serverless<\/u><\/a>. \u0423\u202fYandex.Cloud\u202f\u0435\u0441\u0442\u044c&nbsp;\u0441\u0432\u043e\u0439\u202f<a href=\"https:\/\/github.com\/yandex-cloud\/serverless-plugin\" rel=\"noopener noreferrer nofollow\"><u>\u043f\u043b\u0430\u0433\u0438\u043d<\/u><\/a>,\u202f\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442&nbsp;\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c&nbsp;\u0444\u0443\u043d\u043a\u0446\u0438\u0438.\u202f\u0418\u0437 \u043d\u0435\u0433\u043e \u043f\u043e\u043a\u0430 \u043d\u0435\u043b\u044c\u0437\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2014\u202fYandex\u202fAPI&nbsp;Gateway,\u202f\u043c\u044b\u202f\u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e\u202f\u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c.&nbsp;<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u202fServerless\u202fFramework\u202f\u0438 \u043f\u043b\u0430\u0433\u0438\u043d \u043a \u043d\u0435\u043c\u0443:&nbsp;<\/p>\n<pre><code class=\"bash\">npm i -g serverless serverless-yandex-cloud <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435\u202f\u0444\u0430\u0439\u043b\u202f<em>serverless.yaml<\/em>&nbsp;\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:\u202f&nbsp;&nbsp;<\/p>\n<pre><code class=\"markdown\">service: sample-app frameworkVersion: \"&gt;=1.1.0\" configValidationMode: off  provider:   name: yandex-cloud   runtime: nodejs12-preview  plugins:   - serverless-yandex-cloud  package:   exclude:     - .\/**   include:     - .\/package.json     - .\/**\/*.js  functions:   express:     # this is formatted as &lt;FILENAME&gt;.&lt;HANDLER&gt;     handler: index.handler     memory: 128     timeout: 5<\/code><\/pre>\n<p>\u0414\u0435\u043f\u043b\u043e\u0438\u043c\u202f\u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:&nbsp;<\/p>\n<pre><code class=\"bash\">serverless\u202fdeploy\u202f<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438\u202f\u0441\u0434\u0435\u043b\u0430\u0442\u044c&nbsp;\u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0435\u0435 \u043f\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c\u0443 URL, \u043f\u0435\u0440\u0435\u0434\u0430\u0432 \u043f\u0443\u0442\u044c\u202f<strong>\/api\/info <\/strong>, \u0442\u043e \u0432 \u043e\u0442\u0432\u0435\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443:&nbsp;<\/p>\n<pre><code class=\"bash\">$ curl 'https:\/\/functions.yandexcloud.net\/%function-id%\/api\/info' {\"errorCode\":400,\"errorMessage\":\"Invalid functionID: \/%function-id%\/api\/info\", \"errorType\":\"ProxyIntegrationError\"}<\/code><\/pre>\n<p>&nbsp;\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 API\u202fGateway.\u202f&nbsp;<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 API\u202fGateway\u202f<\/h2>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c&nbsp;\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443\u202f<a href=\"http:\/\/spec.openapis.org\/oas\/v3.0.3\" rel=\"noopener noreferrer nofollow\"><u>OpenAPI&nbsp;3.0<\/u><\/a>, \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e API&nbsp;\u0435\u0435\u202f\u043c\u043e\u0436\u043d\u043e&nbsp;\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c&nbsp;\u0440\u0443\u043a\u0430\u043c\u0438:&nbsp;<\/p>\n<pre><code>openapi: 3.0.0 info:   title: Sample API   version: 1.0.0 paths:   \/api\/info:     get:       responses:         '200':           description: Ok       x-yc-apigateway-integration:         type: cloud_functions         function_id: %function_id%         tag: $latest         service_account_id: %service_account_id%   \/api\/v1\/getback:     post:       responses:         '200':           description: Ok           content:             application\/json:               schema:                 $ref: '#\/components\/schemas\/Test'       requestBody:         required: false         content:           application\/json:             schema:               $ref: '#\/components\/schemas\/Test'       x-yc-apigateway-integration:         type: cloud_functions         function_id: %function_id%         tag: $latest         service_account_id: %service_account_id%  components:   schemas:     Test:       type: object<\/code><\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435&nbsp;\u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c&nbsp;<strong><em>%function_id%<\/em><\/strong><em>&nbsp;<\/em>\u0438&nbsp;<strong><em>%service_account_id%<\/em><\/strong><em>&nbsp;<\/em>\u043d\u0430 \u0432\u0430\u0448\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0423 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0440\u043e\u043b\u044c&nbsp;<strong>serverless.functions.invoker<\/strong>&nbsp;\u0438\u043b\u0438&nbsp;\u0432\u044b\u0448\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0431\u0435\u0437 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430.&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u0412&nbsp;\u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0445&nbsp;\u0441\u043b\u0443\u0447\u0430\u044f\u0445&nbsp;\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c&nbsp;\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e&nbsp;OpenAPI&nbsp;\u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043a\u043e\u0434\u0430 API. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e&nbsp;\u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442&nbsp;<a href=\"https:\/\/www.npmjs.com\/package\/express-oas-generator\" rel=\"noopener noreferrer nofollow\">express-oas-generator<\/a>.&nbsp;<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438&nbsp;\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043f\u043e URL.&nbsp;<\/p>\n<pre><code class=\"bash\">$ curl 'https:\/\/%api-gw-id%.apigw.yandexcloud.net\/api\/info' {\"application\":\"sample-app\",\"version\":\"1\"}<\/code><\/pre>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438,&nbsp;\u043a&nbsp;API&nbsp;Gateway&nbsp;\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0434\u043e\u043c\u0435\u043d.&nbsp;\u041a\u0430\u043a&nbsp;\u043f\u0440\u0438\u044f\u0437\u0430\u0442\u044c&nbsp;\u0434\u043e\u043c\u0435\u043d&nbsp;\u2014&nbsp;\u0447\u0438\u0442\u0430\u0439\u0442\u0435&nbsp;\u0432 \u044d\u0442\u043e\u043c&nbsp;<a href=\"https:\/\/habr.com\/ru\/post\/547134\/\" rel=\"noopener noreferrer nofollow\"><u>\u043f\u043e\u0441\u0442\u0435<\/u><\/a>.&nbsp;&nbsp;<\/p>\n<h2>\u041d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440&nbsp;API&nbsp;Gateway&nbsp;<\/h2>\n<p>\u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432&nbsp;API&nbsp;Gateway&nbsp;\u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432\u0438\u0434\u0430&nbsp;<strong><em>{param+}<\/em><\/strong>.&nbsp;\u0412&nbsp;\u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0443\u0442&nbsp;\u043c\u0430\u0442\u0447\u0438\u0442\u044c\u0441\u044f&nbsp;\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043f\u0443\u0442\u0438.&nbsp;<\/p>\n<pre><code>paths:   \/api\/{proxy+}:     get:       x-yc-apigateway-integration:         type: cloud_functions         function_id: d4e***         tag: $latest         service_account_id: aje***       responses:         200:           description: Ok       parameters:         - explode: true           in: path           name: proxy           required: true           schema:             type: string           style: simple<\/code><\/pre>\n<p>\u0412&nbsp;\u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u202f<strong>event<\/strong>\u202f\u0432&nbsp;\u043f\u0440\u043e\u043f\u0435\u0440\u0442\u0438\u202f<strong>path<\/strong>\u202f\u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c&nbsp;\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435&nbsp;\u0432\u0438\u0434\u0430\u202f<strong>\/api\/%7Bproxy+%7D<\/strong>\u202f\u0438 \u0440\u043e\u0443\u0442\u0435\u0440&nbsp;Express.js&nbsp;\u0431\u0443\u0434\u0435\u0442 \u043b\u043e\u043c\u0430\u0442\u044c\u0441\u044f.&nbsp;<\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0430:&nbsp;<\/p>\n<ul>\n<li>\n<p>\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0435\u0441\u0442\u043d\u044b\u0439&nbsp;provider&nbsp;\u0434\u043b\u044f&nbsp;Yandex.Cloud&nbsp;\u043f\u043e \u043e\u0431\u0440\u0430\u0437\u0443 \u0442\u043e\u0433\u043e,&nbsp;\u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u043b\u044f\u202f<a href=\"https:\/\/github.com\/dougmoscrop\/serverless-http\/tree\/master\/lib\/provider\/aws\" rel=\"noopener noreferrer nofollow\">AWS<\/a>;&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u0442\u044c&nbsp;\u043e\u0431\u044a\u0435\u043a\u0442&nbsp;<strong>event<\/strong>, \u043f\u043e\u043b\u043e\u0436\u0438\u0432 \u0432\u202f<strong>path<\/strong>\u202f\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u202f<strong>url<\/strong>&nbsp;(\u0441\u0442\u0440\u043e\u043a\u0438&nbsp;13\u201319&nbsp;\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0438\u0436\u0435).&nbsp;<\/p>\n<\/li>\n<\/ul>\n<p>&nbsp;\u041f\u0440\u0438\u043c\u0435\u0440 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430&nbsp;\u043c\u043e\u0436\u043d\u043e&nbsp;<a href=\"https:\/\/gist.github.com\/nikolaymatrosov\/bf440061f96aa8627a9e1fae0d8d3278#file-index-js\" rel=\"noopener noreferrer nofollow\"><u>\u0441\u043a\u0430\u0447\u0430\u0442\u044c<\/u><\/a>.&nbsp;&nbsp;<\/p>\n<pre><code class=\"javascript\">const express = require('express'); const serverless = require('serverless-http'); const app = express(); app.use(express.urlencoded({ extended: true })); app.use(express.json()); app.get('\/api\/info', (req, res) =&gt; {     res.send({ application: 'sample-app', version: '1.0' }); }); app.get('\/api\/pet\/:name?', (req, res) =&gt; {     res.send({ ...req.params }); });  module.exports.handler = (event, context) =&gt; {     const patchedEvent = {         ...event,         path: event.url,         originalPath: event.path,     }     return serverless(app)(patchedEvent, context); }<\/code><\/pre>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e&nbsp;\u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Express.js  \u043d\u0430 Yandex\u202fCloud\u202fFunctions&nbsp;\u043f\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435&nbsp;<a href=\"http:\/\/cloud.yandex.ru\/docs\/billing\/concepts\/serverless-free-tier?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=serverless\" rel=\"noopener noreferrer nofollow\">free&nbsp;tier<\/a>:&nbsp;\u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u0442\u0430\u0440\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442&nbsp;\u043f\u0435\u0440\u0432\u044b\u0439&nbsp;\u043c\u0438\u043b\u043b\u0438\u043e\u043d&nbsp;\u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043f\u0435\u0440\u0432\u044b\u0435 10&nbsp;\u0413\u0411\u00d7\u0447\u0430\u0441&nbsp;\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439.&nbsp;\u0410 \u043b\u044e\u0431\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b&nbsp;\u043e&nbsp;\u0440\u0430\u0431\u043e\u0442\u0435&nbsp;\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u043a\u0430\u043a \u0441 \u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438, \u0442\u0430\u043a \u0438&nbsp;\u0441 \u0438\u0445&nbsp;\u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044f\u043c\u0438&nbsp;\u0432&nbsp;\u0447\u0430\u0442\u0435 <a href=\"https:\/\/t.me\/YandexCloudFunctions\" rel=\"noopener noreferrer nofollow\"><u>Yandex Serverless Ecosystem<\/u><\/a>.&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/555108\/\"> https:\/\/habr.com\/ru\/post\/555108\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-322445","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=322445"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322445\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=322445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=322445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}