{"componentChunkName":"component---src-templates-blog-detail-tsx","path":"/blog/2020-03-11-blazor-webAssembly","result":{"data":{"currentBlog":{"id":"a6f28826-bc2f-552b-80ef-d961efacd2b0","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020318/1584508672111-Blazor.jpg","authors":["Elder James"],"categories":["user-stories"],"date":"2020-03-11T00:00:00.000Z","title":"通过 Serverless 加速 Blazor WebAssembly","description":"本文为 Serverless 社区成员撰稿。作者杨舜杰，系统架构研发工程师，开源爱好者，.NET开源项目 shriek-fx 作者","authorslink":["https://zhuanlan.zhihu.com/ServerlessGo"],"translators":null,"translatorslink":null,"tags":["Serverless","Blazor"],"keywords":"Serverless Blazor,Blazor WebAssembly,Serverless加速","outdated":true},"wordCount":{"words":215,"sentences":50,"paragraphs":49},"fileAbsolutePath":"/opt/build/repo/content/blog/2020-03-11-blazor-webAssembly.md","fields":{"slug":"/blog/2020-03-11-blazor-webAssembly/","keywords":["nodejs","serverless","website","blazor","bucket","serverless","BlazorServerless","Serverless","Blazor"]},"html":"<h2 id=\"blazor--serverless\"><a href=\"#blazor--serverless\" aria-label=\"blazor  serverless permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Blazor ❤ Serverless</h2>\n<p>我正在开发 Ant Design 的 Blazor 版本，预览页面部署在 Github Pages 上，但是加载速度很不理想，往往需要 1 分钟多钟才完成。</p>\n<p>项目地址：<strong><a href=\"https://link.zhihu.com/?target=https%3A//github.com/ElderJames/ant-design-blazor\">https://github.com/ElderJames/ant-design-blazor</a></strong>，求 Star。</p>\n<p>当寻求解决方案时，了解到了 Serverless 可以轻松地部署静态网站到腾讯云的对象存储服务上，经过尝试之后，体验非常好！访问速度就变成了 3 秒钟，心想 Blazor 与 Serverless 结合后，是一定能成功的。</p>\n<ul>\n<li><strong>Blazor WebAssembly 简介</strong></li>\n</ul>\n<p>Blazor 是 .NET 实现的前端框架，它使一套代码可分别支持服务端 WebSocket 双向绑定或者是运行在 WebAssembly上。Blazor WebAssembly 可以让开发者使用跟熟悉的 Razor 模版同样的开发模型，来开发基于 WebAssembly 的 SPA 应用。目前 Blazor WebAssembly 已经是在 WebAssembly 领域中发展得最完善的 Web 框架。</p>\n<ul>\n<li><strong>Serverless 简介</strong></li>\n</ul>\n<p>Serverless 是开发者和企业用户共同推动的,它可以使开发者在构建和运行应用时无需管理服务器等基础设施，将构建应用的成本进一步降低，函数是部署和运行的基本单位。</p>\n<p>开发者无需关心底层资源即可部署完整可用的 Serverless 应用架构。</p>\n<h2 id=\"创建-blazor-webassembly-应用程序\"><a href=\"#%E5%88%9B%E5%BB%BA-blazor-webassembly-%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F\" aria-label=\"创建 blazor webassembly 应用程序 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>创建 Blazor WebAssembly 应用程序</h2>\n<h3 id=\"前置准备\"><a href=\"#%E5%89%8D%E7%BD%AE%E5%87%86%E5%A4%87\" aria-label=\"前置准备 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>前置准备</h3>\n<p>安装.NET Core SDK 3.1.2 以上版本 <strong><a href=\"https://link.zhihu.com/?target=https%3A//dotnet.microsoft.com/download/dotnet-core\">下载地址</a></strong></p>\n<h3 id=\"安装模板\"><a href=\"#%E5%AE%89%E8%A3%85%E6%A8%A1%E6%9D%BF\" aria-label=\"安装模板 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>安装模板</h3>\n<p>Blazor WebAssembly 目前还在 preview 阶段，所以正式发布的.NET Core SDK 还没有内置模版，但是我们可以手动安装模版。</p>\n<p>运行命令</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"13193868815288613000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.2.0-preview1.20073.1`, `13193868815288613000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.2.0-preview1.20073.1</code></pre></div>\n<h3 id=\"创建项目\"><a href=\"#%E5%88%9B%E5%BB%BA%E9%A1%B9%E7%9B%AE\" aria-label=\"创建项目 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>创建项目</h3>\n<p>运行命令</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"10069756704924205000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`dotnet new blazorwasm -o BlazorServerless`, `10069756704924205000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">dotnet new blazorwasm -o BlazorServerless</code></pre></div>\n<p>可以看到在 BlazorServerless 已经创建好了 Web WebAssembly 应用。我们进入目录，：</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"17575858418952905000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`cd BlazorServerless\ndotnet run`, `17575858418952905000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">cd BlazorServerless\ndotnet run</code></pre></div>\n<p>访问 <code class=\"language-text\">https://localhost:5001</code> 就能浏览了。</p>\n<p><img src=\"https://pic1.zhimg.com/80/v2-34b6f319477e5e8d7179eb4915c6a024_1440w.jpg\" alt=\"img\"></p>\n<p>可以看到，加载时要加载 2.1MB 的文件，首次加载时对网速的压力还是很大的。如果部署在境外，例如 Github Pages，可能就需要等上好几分钟了。</p>\n<p>所幸，我们可以用 Serverless 把它部署到国内服务器上，解决了加载问题。</p>\n<h3 id=\"发布项目\"><a href=\"#%E5%8F%91%E5%B8%83%E9%A1%B9%E7%9B%AE\" aria-label=\"发布项目 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>发布项目</h3>\n<p>现在，我们需要发布这个项目，生成需要部署的文件。</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"20132498315744640000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`dotnet publish -o publish`, `20132498315744640000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">dotnet publish -o publish</code></pre></div>\n<p>这样，<code class=\"language-text\">publish\\BlazorServerless\\dist</code> 目录里的文件就是我们需要部署的文件了！</p>\n<p><img src=\"https://pic1.zhimg.com/80/v2-9eba0d8682c4407d39ee1e6db250e0c0_1440w.jpg\" alt=\"img\"></p>\n<h2 id=\"部署到腾讯云-serverless-平台\"><a href=\"#%E9%83%A8%E7%BD%B2%E5%88%B0%E8%85%BE%E8%AE%AF%E4%BA%91-serverless-%E5%B9%B3%E5%8F%B0\" aria-label=\"部署到腾讯云 serverless 平台 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>部署到腾讯云 Serverless 平台</h2>\n<h3 id=\"前置准备-1\"><a href=\"#%E5%89%8D%E7%BD%AE%E5%87%86%E5%A4%87-1\" aria-label=\"前置准备 1 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>前置准备</h3>\n<p>首先确保系统包含以下环境：</p>\n<ul>\n<li><strong><a href=\"https://link.zhihu.com/?target=https%3A//nodejs.org/dist/v12.16.1/node-v12.16.1-x64.msi\">Node.js</a></strong> (Node.js 版本需不低于 8.6，建议使用最新版本)</li>\n</ul>\n<h3 id=\"安装-serverless-cli\"><a href=\"#%E5%AE%89%E8%A3%85-serverless-cli\" aria-label=\"安装 serverless cli permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>安装 serverless cli</h3>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"26313176645710823000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`npm install -g serverless`, `26313176645710823000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">npm install -g serverless</code></pre></div>\n<p>在 Windows 系统上，如果报错，错误提示是<code class=\"language-text\">因为在此系统上禁止运行脚本...</code>，那么请执行命令开启 <code class=\"language-text\">.ps1</code> 脚本</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"26941112870970098000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`set-ExecutionPolicy RemoteSigned`, `26941112870970098000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">set-ExecutionPolicy RemoteSigned</code></pre></div>\n<h3 id=\"添加配置文件\"><a href=\"#%E6%B7%BB%E5%8A%A0%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6\" aria-label=\"添加配置文件 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>添加配置文件</h3>\n<p>现在，需要在上面我们的发布目录 <code class=\"language-text\">publish\\BlazorServerless</code> （跟 <code class=\"language-text\">dist</code> 目录同级）中，创建 <code class=\"language-text\">serverless.yml</code> 文件，内容如下：</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"98200535780006540000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`# serverless.yml\n\nblazor-wasm:\n  component: &quot;@serverless/tencent-website&quot;\n  inputs:\n    code:\n      src: ./dist # Upload static files\n      index: index.html\n      error: index.html\n    region: ap-guangzhou\n    bucketName: blazor-bucket`, `98200535780006540000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\"># serverless.yml\n\nblazor-wasm:\n  component: &quot;@serverless/tencent-website&quot;\n  inputs:\n    code:\n      src: ./dist # Upload static files\n      index: index.html\n      error: index.html\n    region: ap-guangzhou\n    bucketName: blazor-bucket</code></pre></div>\n<p>需要注意的是，如果我们部署的是依赖路由系统的 SPA 站点，<code class=\"language-text\">error</code> 项也要指向 <code class=\"language-text\">index.html</code>，这样在直接访问子路由时，还能回到index页面加载路由。否则会有 404 错误。</p>\n<p>配置完成后，文件目录如下：</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"29014246386861343000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`/BlazorServerless\n  ├── publish/BlazorServerless\n  |    ├── dist\n  |    |   ├── _framework\n  |    |   ├── css\n  |    |   ├── sample-data\n  |    |   └── index.html\n  |    └── serverless.yml\n  └── README.md`, `29014246386861343000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">/BlazorServerless\n  ├── publish/BlazorServerless\n  |    ├── dist\n  |    |   ├── _framework\n  |    |   ├── css\n  |    |   ├── sample-data\n  |    |   └── index.html\n  |    └── serverless.yml\n  └── README.md</code></pre></div>\n<p><img src=\"https://pic1.zhimg.com/80/v2-ec8472a435a87f601c3193ab5c878014_1440w.jpg\" alt=\"img\"></p>\n<h2 id=\"部署并浏览\"><a href=\"#%E9%83%A8%E7%BD%B2%E5%B9%B6%E6%B5%8F%E8%A7%88\" aria-label=\"部署并浏览 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>部署并浏览</h2>\n<p>在上图所示，即 <code class=\"language-text\">serverless.yml</code> 文件所在目录下，通过 <code class=\"language-text\">serverless</code> 命令进行部署，添加 --debug 参数查看部署详情：</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"64126295326120550000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`serverless --debug`, `64126295326120550000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">serverless --debug</code></pre></div>\n<p>如果这个目录是第一次授权，或者没有创建环境变量文件设置授权信息，则会出现一个二维码，不管有没有注册过腾讯云，都能通过微信扫码授权开通，非常方便。</p>\n<p>以下是输入以上命令后的控制台的输出：</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"44825006779107320000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`PS D:\\code\\net\\blazor\\BlazorServerless\\publish\\BlazorServerless> serverless --debug\n\n  DEBUG ─ Resolving the template's static variables.\n  DEBUG ─ Collecting components from the template.\n  DEBUG ─ Downloading any NPM components found in the template.\n  DEBUG ─ Analyzing the template's components dependencies.\n  DEBUG ─ Creating the template's components graph.\n  DEBUG ─ Syncing template state.\n  DEBUG ─ Executing the template's components graph.\n\n(此处会出现二维码)\n\nPlease scan QR code login from wechat.\nWait login...\nLogin successful for TencentCloud.\n  DEBUG ─ Preparing website Tencent COS bucket blazor-bucket-1256169759.\n  DEBUG ─ Bucket &quot;blazor-bucket-1256169759&quot; in the &quot;ap-guangzhou&quot; region already exist.\n  DEBUG ─ Setting ACL for &quot;blazor-bucket-1256169759&quot; bucket in the &quot;ap-guangzhou&quot; region.\n  DEBUG ─ Ensuring no CORS are set for &quot;blazor-bucket-1256169759&quot; bucket in the &quot;ap-guangzhou&quot; region.\n  DEBUG ─ Ensuring no Tags are set for &quot;blazor-bucket-1256169759&quot; bucket in the &quot;ap-guangzhou&quot; region.\n  DEBUG ─ Configuring bucket blazor-bucket-1256169759 for website hosting.\n  DEBUG ─ Uploading website files from D:\\code\\net\\blazor\\BlazorServerless\\publish\\BlazorServerless\\dist to bucket blazor-bucket-1256169759.\n  DEBUG ─ Starting upload to bucket blazor-bucket-1256169759 in region ap-guangzhou\n  DEBUG ─ Uploading directory D:\\code\\net\\blazor\\BlazorServerless\\publish\\BlazorServerless\\dist to bucket blazor-bucket-1256169759\n  DEBUG ─ Website deployed successfully to URL: http://blazor-bucket-1256169759.cos-website.ap-guangzhou.myqcloud.com.\n\n  blazor-wasm:\n    url: http://blazor-bucket-1256169759.cos-website.ap-guangzhou.myqcloud.com\n    env:\n\n  116s » blazor-wasm » done`, `44825006779107320000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">PS D:\\code\\net\\blazor\\BlazorServerless\\publish\\BlazorServerless&gt; serverless --debug\n\n  DEBUG ─ Resolving the template&#39;s static variables.\n  DEBUG ─ Collecting components from the template.\n  DEBUG ─ Downloading any NPM components found in the template.\n  DEBUG ─ Analyzing the template&#39;s components dependencies.\n  DEBUG ─ Creating the template&#39;s components graph.\n  DEBUG ─ Syncing template state.\n  DEBUG ─ Executing the template&#39;s components graph.\n\n(此处会出现二维码)\n\nPlease scan QR code login from wechat.\nWait login...\nLogin successful for TencentCloud.\n  DEBUG ─ Preparing website Tencent COS bucket blazor-bucket-1256169759.\n  DEBUG ─ Bucket &quot;blazor-bucket-1256169759&quot; in the &quot;ap-guangzhou&quot; region already exist.\n  DEBUG ─ Setting ACL for &quot;blazor-bucket-1256169759&quot; bucket in the &quot;ap-guangzhou&quot; region.\n  DEBUG ─ Ensuring no CORS are set for &quot;blazor-bucket-1256169759&quot; bucket in the &quot;ap-guangzhou&quot; region.\n  DEBUG ─ Ensuring no Tags are set for &quot;blazor-bucket-1256169759&quot; bucket in the &quot;ap-guangzhou&quot; region.\n  DEBUG ─ Configuring bucket blazor-bucket-1256169759 for website hosting.\n  DEBUG ─ Uploading website files from D:\\code\\net\\blazor\\BlazorServerless\\publish\\BlazorServerless\\dist to bucket blazor-bucket-1256169759.\n  DEBUG ─ Starting upload to bucket blazor-bucket-1256169759 in region ap-guangzhou\n  DEBUG ─ Uploading directory D:\\code\\net\\blazor\\BlazorServerless\\publish\\BlazorServerless\\dist to bucket blazor-bucket-1256169759\n  DEBUG ─ Website deployed successfully to URL: http://blazor-bucket-1256169759.cos-website.ap-guangzhou.myqcloud.com.\n\n  blazor-wasm:\n    url: http://blazor-bucket-1256169759.cos-website.ap-guangzhou.myqcloud.com\n    env:\n\n  116s » blazor-wasm » done</code></pre></div>\n<p>这样，最后出现绿色的 Done 字样，就说明部署成功了！访问给出的url，就能看到部署在腾讯云对象存储服务中的站点了！</p>\n<p><img src=\"https://pic1.zhimg.com/80/v2-fe84c499456921a25b36d59c6910c034_1440w.jpg\" alt=\"img\"></p>\n<p>访问时加载速度非常快！</p>\n<hr>\n<div id='scf-deploy-iframe-or-md'></div>\n<hr>\n<blockquote>\n<p><strong>传送门：</strong></p>\n<ul>\n<li>GitHub: <a href=\"https://github.com/serverless/serverless/blob/master/README_CN.md\">github.com/serverless</a></li>\n<li>官网：<a href=\"https://serverless.com/\">serverless.com</a></li>\n</ul>\n</blockquote>\n<p>欢迎访问：<a href=\"https://serverlesscloud.cn/\">Serverless 中文网</a>，您可以在 <a href=\"https://serverlesscloud.cn/best-practice\">最佳实践</a> 里体验更多关于 Serverless 应用的开发！</p>","tableOfContents":"<ul>\n<li><a href=\"/blog/2020-03-11-blazor-webAssembly/#blazor--serverless\">Blazor ❤ Serverless</a></li>\n<li>\n<p><a href=\"/blog/2020-03-11-blazor-webAssembly/#%E5%88%9B%E5%BB%BA-blazor-webassembly-%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F\">创建 Blazor WebAssembly 应用程序</a></p>\n<ul>\n<li><a href=\"/blog/2020-03-11-blazor-webAssembly/#%E5%89%8D%E7%BD%AE%E5%87%86%E5%A4%87\">前置准备</a></li>\n<li><a href=\"/blog/2020-03-11-blazor-webAssembly/#%E5%AE%89%E8%A3%85%E6%A8%A1%E6%9D%BF\">安装模板</a></li>\n<li><a href=\"/blog/2020-03-11-blazor-webAssembly/#%E5%88%9B%E5%BB%BA%E9%A1%B9%E7%9B%AE\">创建项目</a></li>\n<li><a href=\"/blog/2020-03-11-blazor-webAssembly/#%E5%8F%91%E5%B8%83%E9%A1%B9%E7%9B%AE\">发布项目</a></li>\n</ul>\n</li>\n<li>\n<p><a href=\"/blog/2020-03-11-blazor-webAssembly/#%E9%83%A8%E7%BD%B2%E5%88%B0%E8%85%BE%E8%AE%AF%E4%BA%91-serverless-%E5%B9%B3%E5%8F%B0\">部署到腾讯云 Serverless 平台</a></p>\n<ul>\n<li><a href=\"/blog/2020-03-11-blazor-webAssembly/#%E5%89%8D%E7%BD%AE%E5%87%86%E5%A4%87-1\">前置准备</a></li>\n<li><a href=\"/blog/2020-03-11-blazor-webAssembly/#%E5%AE%89%E8%A3%85-serverless-cli\">安装 serverless cli</a></li>\n<li><a href=\"/blog/2020-03-11-blazor-webAssembly/#%E6%B7%BB%E5%8A%A0%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6\">添加配置文件</a></li>\n</ul>\n</li>\n<li><a href=\"/blog/2020-03-11-blazor-webAssembly/#%E9%83%A8%E7%BD%B2%E5%B9%B6%E6%B5%8F%E8%A7%88\">部署并浏览</a></li>\n</ul>"},"previousBlog":{"id":"55953085-8519-57ce-bf38-6f3a36d113c3","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020318/1584508229341-blogging.jpg","authors":["云洋"],"categories":["user-stories"],"date":"2020-03-12T00:00:00.000Z","title":"Serverless 动态博客开发趟「坑」记","description":"本文为 Serverless 社区成员撰稿。作者云洋，从事信息管理工作，多年电子政务信息系统建设管理经验，对 Serverless 技术和架构有浓厚兴趣。","authorslink":["https://zhuanlan.zhihu.com/ServerlessGo"],"translators":null,"translatorslink":null,"tags":["Serverless","动态博客"],"keywords":"Serverless 动态博客开发,Serverless 动态博客,Serverless 开发","outdated":true},"wordCount":{"words":391,"sentences":74,"paragraphs":74},"fileAbsolutePath":"/opt/build/repo/content/blog/2020-03-12-blog-issues.md","fields":{"slug":"/blog/2020-03-12-blog-issues/","keywords":["serverless","website","部署","serverlesscloud","报错"]}},"nextBlog":{"id":"eb3e239f-0ac6-5381-8a51-26142f95edfc","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020318/1584510373593-lab.jpg","authors":["高晨远"],"categories":["user-stories"],"date":"2020-03-09T00:00:00.000Z","title":"实验室站迁移 Serverless 之路（上）","description":"本文为 Serverless 社区成员撰稿。作者高晨远，研发工程师，熟悉 Python 开发，常写 Web 和爬虫","authorslink":["https://zhuanlan.zhihu.com/ServerlessGo"],"translators":null,"translatorslink":null,"tags":["Serverless","Python"],"keywords":"Serverless Flask 框架,Serverless 框架,Serverless 迁移方案","outdated":true},"wordCount":{"words":305,"sentences":63,"paragraphs":62},"fileAbsolutePath":"/opt/build/repo/content/blog/2020-03-09-community-chenyuan.md","fields":{"slug":"/blog/2020-03-09-community-chenyuan/","keywords":["go","nodejs","python","serverless","无服务器","无服务器架构","云函数","Serverless","serverless","template","components","requirements"]}},"recommendBlogs":{"edges":[{"node":{"id":"4300b21c-7209-5256-86ff-0d38e3daec9b","frontmatter":{"thumbnail":"https://main.qcloudimg.com/raw/14f1c8eed372e76c1b139703b2f6d0fa.jpg","authors":["KieranMcCarthy"],"categories":["user-stories","engineering-culture"],"date":"2018-01-09T00:00:00.000Z","title":"我是如何在四年时间里，从厨师转行为 Serverless 应用开发者","description":"我是厨师出身，现在成为了一名 Serverless 应用开发者。","authorslink":["https://serverless.com/author/kieranmccarthy/"],"translators":["Aceyclee"],"translatorslink":["https://www.zhihu.com/people/Aceyclee"],"tags":["应用开发","Serverless"],"keywords":"Serverless 应用开发,Serverless 管理,厨师转行为 Serverless 应用开发者","outdated":null},"wordCount":{"words":285,"sentences":38,"paragraphs":36},"fileAbsolutePath":"/opt/build/repo/content/blog/2018-01-09-from-chef-to-serverless-developer-in-4-years.md","fields":{"slug":"/blog/2018-01-09-from-chef-to-serverless-developer-in-4-years/","keywords":["无服务器","无服务器开发","云函数","学习","Serverless","构建","Framework","开发者","服务器","应用","学位","简历"]}}},{"node":{"id":"713a0563-4bf9-5721-bacb-3b4ef609fe4a","frontmatter":{"thumbnail":"https://s3-us-west-2.amazonaws.com/assets.blog.serverless.com/camp-fire/camp-fire-housing-thumb.jpg","authors":["EricWyne"],"categories":["guides-and-tutorials","user-stories"],"date":"2018-12-05T00:00:00.000Z","title":"Serverless Twitter 机器人帮助为坎普山火受灾者安置住房","description":"加利福尼亚州的坎普山火致使数千人流离失所，为此，我构建了一个简单的 Serverless Twitter 机器人来帮助将受灾者安置在临时住房！","authorslink":["https://serverless.com/author/ericwyne/"],"translators":["Aceyclee"],"translatorslink":["zhihu.com/people/Aceyclee"],"tags":null,"keywords":null,"outdated":null},"wordCount":{"words":157,"sentences":26,"paragraphs":26},"fileAbsolutePath":"/opt/build/repo/content/blog/2018-12-05-serverless-twitter-camp-fire.md","fields":{"slug":"/blog/2018-12-05-serverless-twitter-camp-fire/","keywords":["serverless","无服务器","云函数","Serverless","org","住房","Twitter","函数","受灾","机器人","山火"]}}},{"node":{"id":"98602143-b837-5f50-a24f-3b1ec76044d7","frontmatter":{"thumbnail":"https://s3-us-west-2.amazonaws.com/assets.blog.serverless.com/sqquid/sqquid-serverless-thumb.jpg","authors":["RonPeled"],"categories":["user-stories"],"date":"2018-12-17T00:00:00.000Z","title":"SQQUID：100% 无服务器初创公司","description":"SQQUID 将 AWS Lambda 和无服务器框架用于其核心产品和营销网站。我们来看看一个完全无服务器的初创公司是怎样的。","authorslink":null,"translators":null,"translatorslink":null,"tags":null,"keywords":null,"outdated":null},"wordCount":{"words":266,"sentences":42,"paragraphs":42},"fileAbsolutePath":"/opt/build/repo/content/blog/2018-12-17-sqquid-one-hundred-percent-serverless.md","fields":{"slug":"/blog/2018-12-17-sqquid-one-hundred-percent-serverless/","keywords":["go","serverless","无服务器","无服务器架构","服务器","架构","Lambda","集成","FaaS","串行","系统"]}}},{"node":{"id":"29dc2e58-d2ba-56f9-aee1-d21b0bc62e0e","frontmatter":{"thumbnail":"https://s3-us-west-2.amazonaws.com/assets.blog.serverless.com/ao-com-story/ao-serverless-thumbnail.png","authors":["NickGottlieb"],"categories":["user-stories"],"date":"2019-04-24T00:00:00.000Z","title":"AO.com：逐渐转向无服务器优先","description":"AO.com 的 SCV 团队率先尝试无服务器服务。折服于无服务器框架的快速周转时间和低维护成本，整个团队逐渐转向无服务器优先。","authorslink":null,"translators":null,"translatorslink":null,"tags":null,"keywords":null,"outdated":null},"wordCount":{"words":236,"sentences":42,"paragraphs":35},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-04-24-ao-serverless-first.md","fields":{"slug":"/blog/2019-04-24-ao-serverless-first/","keywords":["serverless","无服务器","服务器","团队","Lambda","功能","构建"]}}},{"node":{"id":"752d08d1-387a-5bde-acf3-98141baab294","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020414/1586871710979-%E5%85%AC%E5%85%B1%E7%94%A8.png","authors":["Anycodes"],"categories":["user-stories"],"date":"2019-06-20T00:00:00.000Z","title":"如何用 Serverless 为 Python 云函数打包依赖","description":"在使用无服务器云函数SCF时通常会遇到导入第三方库的问题，很多小伙伴比较头疼是：应该如何打包进去？这里，推荐几个不错的方法。","authorslink":["https://zhuanlan.zhihu.com/ServerlessGo"],"translators":null,"translatorslink":null,"tags":["云函数","Serverless"],"keywords":"Serverless,Serverless应用,无服务器云函数","outdated":null},"wordCount":{"words":81,"sentences":43,"paragraphs":43},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-06-20-for-python-cloud-functions.md","fields":{"slug":"/blog/2019-06-20-for-python-cloud-functions/","keywords":["java","serverless","无服务器","无服务器云函数","云函数","serverlesscloud","安装","serverless","pillowtest"]}}},{"node":{"id":"2dc78814-9d77-555b-a1bb-ad202c8ec2d1","frontmatter":{"thumbnail":"https://s3-us-west-2.amazonaws.com/assets.blog.serverless.com/cloudforecast/thumbnail.png","authors":["FrancoisLagier"],"categories":["user-stories"],"date":"2019-08-07T00:00:00.000Z","title":"Serverless：初创企业的理想选择？（CloudForecast 案例分析）","description":"CloudForecast 是 2018 年成立的一家独立初创企业，本文将介绍他们决定选择 Serverless 的原因。","authorslink":["https://serverless.com/author/francoislagier/"],"translators":["Aceyclee"],"translatorslink":["zhihu.com/people/Aceyclee"],"tags":null,"keywords":null,"outdated":null},"wordCount":{"words":211,"sentences":29,"paragraphs":29},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-08-07-serverless-for-startups.md","fields":{"slug":"/blog/2019-08-07-serverless-for-startups/","keywords":["serverless","云函数","serverless","函数","Serverless","utm","Framework","blog","CloudForecast","cloudforecast"]}}},{"node":{"id":"97450b07-658b-5207-8216-1c7b9b51b115","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020114/1578988490344-v2-8b2cd2c5275aa2c5a3c5083a148a7a9f_1200x500.jpg","authors":["Anycodes"],"categories":["user-stories"],"date":"2019-09-01T00:00:00.000Z","title":"如何通过 Serverless 与自然语言处理，让搜索引擎「看」到你的博客","description":"Serverless 与自然语言处理结合的一个小应用","authorslink":["https://www.zhihu.com/people/liuyu-43-97"],"translators":null,"translatorslink":null,"tags":["个人博客","serverless"],"keywords":"Serverless 自然语言处理","outdated":null},"wordCount":{"words":106,"sentences":34,"paragraphs":34},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-09-01-search-engine-blog.md","fields":{"slug":"/blog/2019-09-01-search-engine-blog/","keywords":["serverless","云函数","keywords","serverlesscloud","summary"]}}},{"node":{"id":"ae4fd2f8-515c-5aec-b584-38427ef33f7e","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020114/1578989800047-part-00492-780.jpg","authors":["Anycodes"],"categories":["guides-and-tutorials","user-stories"],"date":"2019-09-16T00:00:00.000Z","title":"突破传统 OJ 瓶颈，「判题姬」接入云函数","description":"通过 Serverless 实现在线编程","authorslink":["https://www.zhihu.com/people/liuyu-43-97"],"translators":null,"translatorslink":null,"tags":["在线编程","云函数"],"keywords":"Serverless 在线编程,Serverless OJ","outdated":null},"wordCount":{"words":169,"sentences":30,"paragraphs":30},"fileAbsolutePath":"/opt/build/repo/content/blog/2019-09-16-online-Judge.md","fields":{"slug":"/blog/2019-09-16-online-Judge/","keywords":["python","serverless","云函数","代码","函数","serverless"]}}}],"totalCount":64}},"pageContext":{"isCreatedByStatefulCreatePages":false,"blogId":"a6f28826-bc2f-552b-80ef-d961efacd2b0","previousBlogId":"55953085-8519-57ce-bf38-6f3a36d113c3","nextBlogId":"eb3e239f-0ac6-5381-8a51-26142f95edfc","categories":["user-stories"]}}}