{"componentChunkName":"component---src-templates-best-practice-detail-tsx","path":"/best-practice/2020-12-01-serverless-ssr","result":{"data":{"currentBlog":{"id":"1b27d03d-39ef-5941-afc3-ae84f04d79b0","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020121/1606807877823-1606807107551-ssr%E5%89%AF%E6%9C%AC2.jpg","authors":["April"],"categories":["best-practice"],"date":"2020-12-01T00:00:00.000Z","title":"不改一行代码！快速部署流行框架到腾讯云 Serverless","description":"手把手教你部署传统框架，快来一起实践吧！","authorslink":null,"translators":null,"translatorslink":null,"tags":["Serverless","传统框架"],"keywords":null,"outdated":null},"wordCount":{"words":187,"sentences":46,"paragraphs":46},"fileAbsolutePath":"/opt/build/repo/content/best-practice/2020-12-01-serverless-ssr.md","fields":{"slug":"/best-practice/2020-12-01-serverless-ssr/","keywords":["serverless","ssr","应用","Serverless","部署","控制台","serverlesscloud","创建"]},"html":"<p>不知您是否会有这样的疑惑，使用 Serverless Framework 部署完应用，却不知道如何管理？现在，Serverless 应用控制台帮您完美解决这个问题！</p>\n<p>近日，腾讯云 Serverless 团队正式发布了 <a href=\"https://console.cloud.tencent.com/ssr\">Serverless 应用控制台</a>，您可以通过应用模版或已有项目，实现传统框架上云的快速迁移与管理。</p>\n<p><strong>产品功能支持：</strong></p>\n<ul>\n<li>控制台快速部署</li>\n<li>代码托管持续构建</li>\n<li>支持创建层部署</li>\n<li>监控图表，部署日志查询</li>\n</ul>\n<p><strong>已支持框架：</strong></p>\n<ul>\n<li>Express</li>\n<li>Koa</li>\n<li>Flask</li>\n<li>Laravel</li>\n<li>Egg.js</li>\n<li>Next.js</li>\n<li>Nuxt.js</li>\n</ul>\n<p>后续我们还会增加更多。下面带大家一起快速体验 Serverless 应用控制台的基本功能。</p>\n<blockquote>\n<p>部署前提：账号已开通 <strong><a href=\"https://console.cloud.tencent.com/sls\">Serverless Framework</a></strong> 与 <strong><a href=\"https://console.cloud.tencent.com/coding\">Coding DevOps</a></strong> 服务。</p>\n</blockquote>\n<h2 id=\"如何创建应用\"><a href=\"#%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E5%BA%94%E7%94%A8\" 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>基于模版创建</p>\n<ol>\n<li>进入 <a href=\"https://console.cloud.tencent.com/ssr\">Serverless 应用控制台</a>，点击【新建应用】，进入应用创建页。</li>\n</ol>\n<p><img src=\"https://img.serverlesscloud.cn/20201130/1606743229153-1606141064704-%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7%202020-11-22%2018.20.45.png\"></p>\n<ol start=\"2\">\n<li>填入您的应用名称，【创建方式】选择【应用模版创建】，选择您想要使用的框架模版。</li>\n</ol>\n<p><img src=\"https://img.serverlesscloud.cn/20201130/1606743226373-1606141103195-%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7%202020-11-22%2018.20.57.png\"></p>\n<ol start=\"3\">\n<li>点击【创建】，Serverless 控制台会自动开始为您部署应用，部署完成后，进入应用详情页，可以查看创建的云上资源、监控日志、部署记录等信息，也支持在“开发部署”页面修改配置，重新部署。</li>\n</ol>\n<h2 id=\"如何导入已有项目\"><a href=\"#%E5%A6%82%E4%BD%95%E5%AF%BC%E5%85%A5%E5%B7%B2%E6%9C%89%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>如何导入已有项目</h2>\n<ol>\n<li>进入 <a href=\"https://console.cloud.tencent.com/ssr\">Serverless 应用控制台</a>，点击【新建应用】，进入应用创建页。</li>\n<li>填入您的应用名称，【创建方式】选择【导入已有项目】，选择您使用的框架模版。</li>\n</ol>\n<p><img src=\"https://img.serverlesscloud.cn/20201130/1606743224496-1606141243194-%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7%202020-11-23%2022.19.49.png\"></p>\n<blockquote>\n<p>部分框架项目需要进行简单项目改造，才可以进行部署，详情请参考<a href=\"https://cloud.tencent.com/document/product/1242/50319\">项目改造文档</a></p>\n</blockquote>\n<ol start=\"3\">\n<li>选择代码上传方式，Serverless 控制台支持您直接上传本地项目部署，也可以选择导入代码仓库。</li>\n<li>\n<p>代码托管</p>\n<p>目前支持 <strong>GitHub、GitLab、Gitee</strong> 的代码仓库地址，也支持公开的自定义代码库，您可以通过选择应用的触发方式，完成应用的自动更新。</p>\n</li>\n<li>\n<p>文件夹上传</p>\n<p>您可以通过上传文件夹的方式直接导入本地项目，对于 Node.js 框架，Serverless Framework 将自动为您创建层，并将依赖包 node_modules 传入层中完成部署。</p>\n</li>\n<li>点击【创建】，Serverless 控制台会自动开始为您部署应用，部署完成后，进入应用详情页，可以查看创建的云上资源、监控日志、部署记录等信息，也支持在“开发部署”页面修改配置，重新部署。</li>\n</ol>\n<h2 id=\"如何管理应用\"><a href=\"#%E5%A6%82%E4%BD%95%E7%AE%A1%E7%90%86%E5%BA%94%E7%94%A8\" 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>应用创建完成后，可以在应用详情页，完成查看项目具体信息，主要支持以下几部分管理功能。</p>\n<ol>\n<li>资源管理</li>\n</ol>\n<p>在【资源列表】页，支持查看当前应用为您创建的云资源，并查看基本配置信息。</p>\n<p><img src=\"https://img.serverlesscloud.cn/2020121/1606808273465-b55916d9b944ce1281e5530c1db54115.png\"></p>\n<ol start=\"2\">\n<li>开发部署</li>\n</ol>\n<p>在应用详情页顶部，单击【开发部署】，您可以轻松地实现应用的配置修改与二次部署上传，支持<strong>本地上传、代码托管、CLI 开发</strong>三种方式。</p>\n<p>同时，您也可以在该页面修改应用配置信息，点击「保存」完成重新部署。</p>\n<p><img src=\"https://img.serverlesscloud.cn/20201130/1606743405067-5b727ac0d6715f339574e37d3580ac89.png\"></p>\n<ol start=\"3\">\n<li>应用监控</li>\n</ol>\n<p>在【应用监控】页面，您可以查看项目部署后输出的基本信息、项目请求次数、项目报错统计等多项监控指标，方便您轻松实现项目的管理运维。</p>\n<p><img src=\"https://img.serverlesscloud.cn/20201130/1606743218604-1606384460049-%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7%202020-11-26%2016.22.43.png\"></p>\n<ol start=\"4\">\n<li>部署日志</li>\n</ol>\n<p>在【部署日志】页面，可以看到【通过控制台部署】或【自动触发】的部署日志，以及部署结果。</p>\n<p><img src=\"https://img.serverlesscloud.cn/20201130/1606743221297-1606143280152-%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7%202020-11-23%2022.53.44.png\"></p>\n<p>到这里，就完成了应用迁移至 Serverless 的操作，更多功能与持续开发教程，欢迎查看<a href=\"https://cloud.tencent.com/document/product/1242/45418\">产品文档</a>，实现传统框架的云上开发管理。</p>\n<p>另外我们准备了一份体验问卷，邀请大家填写：<a href=\"https://wj.qq.com/s2/7596920/7fde%EF%BC%8C\">https://wj.qq.com/s2/7596920/7fde，</a> 填写问卷有机会获得腾讯云精美礼品。</p>\n<hr>\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=\"/best-practice/2020-12-01-serverless-ssr/#%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E5%BA%94%E7%94%A8\">如何创建应用</a></li>\n<li><a href=\"/best-practice/2020-12-01-serverless-ssr/#%E5%A6%82%E4%BD%95%E5%AF%BC%E5%85%A5%E5%B7%B2%E6%9C%89%E9%A1%B9%E7%9B%AE\">如何导入已有项目</a></li>\n<li><a href=\"/best-practice/2020-12-01-serverless-ssr/#%E5%A6%82%E4%BD%95%E7%AE%A1%E7%90%86%E5%BA%94%E7%94%A8\">如何管理应用</a></li>\n</ul>"},"previousBlog":{"id":"b748fad1-ea65-5f89-bc0b-d507abcd4823","frontmatter":{"thumbnail":"https://main.qcloudimg.com/raw/a46a4bb5fd3acc0960f7db569084fc83.png","authors":["April"],"categories":["best-practice"],"date":"2020-12-23T00:00:00.000Z","title":"不改一行代码！快速迁移 Express 应用上云","description":"手把手教你部署 Express 应用，快来一起实践吧！","authorslink":null,"translators":null,"translatorslink":null,"tags":["Serverless","Express"],"keywords":null,"outdated":null},"wordCount":{"words":239,"sentences":40,"paragraphs":40},"fileAbsolutePath":"/opt/build/repo/content/best-practice/2020-12-23-serverless-express.md","fields":{"slug":"/best-practice/2020-12-23-serverless-express/","keywords":["serverless","ssr","Serverless","应用","部署","控制台","创建","tencent"]}},"nextBlog":{"id":"86b0d049-5f3c-5418-af12-2cc9d60dff75","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/20201125/1606302616770-1606298812544-%E5%8D%B0%E8%B1%A1%E7%AC%94%E8%AE%B0%E5%B0%81%E9%9D%A2.jpg","authors":["岳峰"],"categories":["best-practice"],"date":"2020-11-25T00:00:00.000Z","title":"腾讯云 Serverless 应用初探 —— 印象笔记","description":"揭秘印象笔记如何进行产品快速迭代","authorslink":null,"translators":null,"translatorslink":null,"tags":["Serverless","客户案例"],"keywords":null,"outdated":null},"wordCount":{"words":164,"sentences":22,"paragraphs":22},"fileAbsolutePath":"/opt/build/repo/content/best-practice/2020-11-25-evernote.md","fields":{"slug":"/best-practice/2020-11-25-evernote/","keywords":["go","serverless","云函数","Serverless","笔记","腾讯","印象","用户","功能","团队","服务","使用","技术"]}}},"pageContext":{"isCreatedByStatefulCreatePages":false,"blogId":"1b27d03d-39ef-5941-afc3-ae84f04d79b0","previousBlogId":"b748fad1-ea65-5f89-bc0b-d507abcd4823","nextBlogId":"86b0d049-5f3c-5418-af12-2cc9d60dff75"}}}