@arcblock/abtnode-docs
Version:
ABT Node Documentation, a help documentation for quickly get started with ABT Node.
1 lines • 17.3 kB
JSON
{"componentChunkName":"component---node-modules-arcblock-gatsby-theme-docs-src-templates-documentation-js","path":"/zh/developer/blocklet-codespaces","result":{"data":{"file":{"changeTime":"5 minutes ago","childMarkdownRemark":{"frontmatter":{"author":"linchen","category":"","date":null,"description":"使用 Codespaces 开发 Blocklets","draft":null,"keywords":"abtnode, blocklet, codespaces","language":"zh","layout":"documentation","path":"/zh/developer/blocklet-codespaces","tags":["abtnode","blocklet","codespaces"],"title":"在 Codespaces 中开发 Blocklets"},"htmlAst":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"a","properties":{"href":"https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/about-codespaces"},"children":[{"type":"text","value":"Codespaces"}]},{"type":"text","value":" 是 Github 推出的云开发环境,你可以完全在云中进行开发。"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"在项目中配置-devcontainer","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E5%9C%A8%E9%A1%B9%E7%9B%AE%E4%B8%AD%E9%85%8D%E7%BD%AE-devcontainer","ariaLabel":"在项目中配置 devcontainer permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"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"},"children":[]}]}]},{"type":"text","value":"在项目中配置 .devcontainer"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"将 "},{"type":"element","tagName":"a","properties":{"href":"https://github.com/blocklet/blocklet-dev-container"},"children":[{"type":"text","value":"https://github.com/blocklet/blocklet-dev-container"}]},{"type":"text","value":" 中 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":".devcontainer"}]},{"type":"text","value":" 目录拷贝至你的项目的根目录下"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"将本地代码 Push 到 Github"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"在-codespaces-中打开项目","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E5%9C%A8-codespaces-%E4%B8%AD%E6%89%93%E5%BC%80%E9%A1%B9%E7%9B%AE","ariaLabel":"在 codespaces 中打开项目 permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"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"},"children":[]}]}]},{"type":"text","value":"在 Codespaces 中打开项目"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"请参考 "},{"type":"element","tagName":"a","properties":{"href":"https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace"},"children":[{"type":"text","value":"https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"启动开发环境","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E5%90%AF%E5%8A%A8%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83","ariaLabel":"启动开发环境 permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"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"},"children":[]}]}]},{"type":"text","value":"启动开发环境"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"请确保 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"abtnode dev"}]},{"type":"text","value":" 可以在你的项目中正常工作"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"在你的 codespaces 中"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"执行 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"abtnode dev"}]},{"type":"text","value":" 启动开发环境"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"启动开发环境成功后,使用 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Command + MouseDown"}]},{"type":"text","value":" 访问 terminal 中的连接"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"✔ Blocklet react-demo@0.1.3 was successfully started\n\nℹ You can access with the following URL\n\n- http://127.0.0.1/admin/welcome/\n\nℹ Note that your blocklet is running in development in ABT Node,\nℹ To run it in production mode, you can use abtnode bundle and then abtnode deploy.\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"当你再次打开 codespace 时,你的 ABT Node daemon 可能已被关闭。此时,请先执行 "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"abtnode start"}]},{"type":"text","value":" 启动 ABT Node daemon"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"faq","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#faq","ariaLabel":"faq permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"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"},"children":[]}]}]},{"type":"text","value":"FAQ"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"无法登录-abt-node","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#%E6%97%A0%E6%B3%95%E7%99%BB%E5%BD%95-abt-node","ariaLabel":"无法登录 abt node permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"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"},"children":[]}]}]},{"type":"text","value":"无法登录 ABT Node"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"目前,Codespaces 中的服务尚未支持公开访问,所以移动端的 ABT Wallet 无法与 Codespace 中的 ABT Node 通信。一个临时解决方案是使用 "},{"type":"element","tagName":"a","properties":{"href":"https://ngrok.com/"},"children":[{"type":"text","value":"ngrok"}]},{"type":"text","value":" 建立一个通道,绕过 Codespaces."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"安装 ngrok"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"],"In":"","your":"","codespace":""},"children":[{"type":"text","value":"# In your codespace\n\ncurl https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip -o ngrok.zip\nunzip ./ngrok.zip\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ol","properties":{"start":2},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"设置 ngrok"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"登录 ngrok: "},{"type":"element","tagName":"a","properties":{"href":"https://dashboard.ngrok.com/login"},"children":[{"type":"text","value":"https://dashboard.ngrok.com/login"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"在你的 codespace 中 设置 authtoken,参考 "},{"type":"element","tagName":"a","properties":{"href":"https://dashboard.ngrok.com/get-started/setup"},"children":[{"type":"text","value":"https://dashboard.ngrok.com/get-started/setup"}]}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"使用 ngrok 建立 ABT Node 访问通道"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"],"In":"","your":"","codespace":""},"children":[{"type":"text","value":"# In your codespace\n\n./ngrok http 80\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"访问通道建立成功后,可以通过 Terminal 中的 Forwarding 地址访问 ABT Node"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"ngrok by @inconshreveable\n\nSession Status online\nAccount linchen1987 (Plan: Free) \nVersion 2.3.35\nRegion United States (us)\nWeb Interface http://127.0.0.1:4040\nForwarding http://xxxxxxxxxxxx.ngrok.io -> http://localhost:80\nForwarding https://xxxxxxxxxxxx.ngrok.io -> http://localhost:80\n\nConnections ttl opn rt1 rt5 p50 p90\n 0 0 0.00 0.00 0.00 0.00 \n"}]}]}],"data":{"quirksMode":false}}}}},"pageContext":{"site":{"title":"ABT Node","description":"ABT Node Documentation","siteUrl":"https://docs.arcblock.io","logoUrl":"/abtnode/","sidebarWidth":360,"disableI18n":false,"showGetStarted":true,"defaultBanner":"/abtnode/og-banner.png"},"id":"0bdfb016-836d-5060-a9b0-3e3f06db0abb","language":"zh","locale":"zh","languages":[{"value":"en","text":"English"},{"value":"zh","text":"简体中文"}],"headings":[{"value":"在项目中配置 .devcontainer","depth":2},{"value":"在 Codespaces 中打开项目","depth":2},{"value":"启动开发环境","depth":2},{"value":"FAQ","depth":2},{"value":"无法登录 ABT Node","depth":3}],"navItems":[{"group":"/home/runner/work/abtnode-docs/abtnode-docs/src","title":"ABT Node","priority":999,"link":"/"}],"version":"v0.2.20","official":true,"originalPath":"/zh/developer/blocklet-codespaces","sidebarContent":[{"url":null,"title":null,"pages":[{"title":"ABT Node 文档","path":"/zh/"}]},{"url":"/zh/introduction","title":"节点入门","pages":[{"title":"节点功能概览","path":"/zh/introduction/abtnode-overview"},{"title":"如何获取 ABT 节点","path":"/zh/introduction/abtnode-setup"},{"title":"配置并启动 ABT 节点","path":"/zh/introduction/abtnode-access"}]},{"url":"/zh/marketplace","title":"应用市场","pages":[{"title":"查找和安装 Blocklet","path":"/zh/marketplace/find-and-install"},{"title":"升级或降级 Blocklet","path":"/zh/marketplace/upgrade-downgrade"}]},{"url":"/zh/blocklet","title":"应用管理","pages":[{"title":"基本管理操作","path":"/zh/blocklet/basic-operations"},{"title":"环境变量管理","path":"/zh/blocklet/environments"},{"title":"核心 Blocklets","path":"/zh/blocklet/core-blocklets"}]},{"url":"/zh/router","title":"路由管理","pages":[{"title":"什么是路由","path":"/zh/router/what-is-router"},{"title":"路由的基本用法","path":"/zh/router/basic-usage"},{"title":"给站点绑定域名以及启用 SSL","path":"/zh/router/bind-domain-and-ssl"},{"title":"localhost 证书","path":"/zh/router/certificates-for-localhost"}]},{"url":"/zh/deployment","title":"生产环境指南","pages":[{"title":"部署最佳实践","path":"/zh/deployment/best-practice"},{"title":"在 AWS 上部署","path":"/zh/deployment/from-aws-ami"},{"title":"运行在反向代理","path":"/zh/deployment/behind-reverse-proxy"},{"title":"在 Docker 中运行","path":"/zh/deployment/run-in-docker"}]},{"url":"/zh/misc","title":"其他功能","pages":[{"title":"节点配置","path":"/zh/misc/node-settings"},{"title":"成员管理","path":"/zh/misc/member-management"},{"title":"GraphQL 试验台","path":"/zh/misc/graphql-console"}]},{"url":"/zh/developer","title":"开发者指南","pages":[{"title":"配置开发环境","path":"/zh/developer/config-dev-env"},{"title":"ABT 节点 cli 工具","path":"/zh/developer/abtnode-cli"},{"title":"节点配置","path":"/zh/developer/configuration"},{"title":"节点存储目录详解","path":"/zh/developer/storage-structure"},{"title":"Blocklet 规范","path":"/zh/developer/blocklet-spec"},{"title":"创建静态 Blocklets","path":"/zh/developer/static-blocklets"},{"title":"创建 DApp Blocklets","path":"/zh/developer/dapp-blocklets"},{"title":"Blocklet 生命周期钩子","path":"/zh/developer/blocklet-hooks"},{"title":"打包 Blocklet","path":"/zh/developer/bundle-blocklets"},{"title":"发布 Blocklet","path":"/zh/developer/publish-blocklets"},{"title":"Blocklet 仓库","path":"/zh/developer/blocklet-registry"},{"title":"在 Codespaces 中开发 Blocklets","path":"/zh/developer/blocklet-codespaces"},{"title":"为 Blocklet 配置 Auth Service","path":"/zh/developer/auth-service"},{"title":"可组合的 Blocklet","path":"/zh/developer/composable-blocklet"},{"title":"Docker 镜像源列表","path":"/zh/developer/docker-registry"}]}],"communityPath":"https://community.arcblockio.cn","githubUrl":"https://github.com/ArcBlock/abtnode-docs/tree/master/src/developer/blocklet-codespaces/index.zh.md"}},"staticQueryHashes":["1358860651","1619896071","1812186216","2194038815"]}