UNPKG

@arcblock/abtnode-docs

Version:

ABT Node Documentation, a help documentation for quickly get started with ABT Node.

1 lines 17.6 kB
{"componentChunkName":"component---node-modules-arcblock-gatsby-theme-docs-src-templates-documentation-js","path":"/en/developer/blocklet-codespaces","result":{"data":{"file":{"changeTime":"5 minutes ago","childMarkdownRemark":{"frontmatter":{"author":"linchen","category":"","date":null,"description":"Developing Blocklets with Codespaces","draft":null,"keywords":"abtnode, blocklet, codespaces","language":"en","layout":"documentation","path":"/en/developer/blocklet-codespaces","tags":["abtnode","blocklet","codespaces"],"title":"Developing Blocklets with Codespaces"},"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":" is an online development environment, hosted by GitHub, that allows you to develop entirely in the cloud."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"config-devcontainer-in-your-project","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#config-devcontainer-in-your-project","ariaLabel":"config devcontainer in your project 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":"Config .devcontainer in your project"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Copy the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":".devcontainer"}]},{"type":"text","value":" directory in "},{"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":" to the root directory of your project."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Push your local code to Github"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"open-you-project-in-codespaces","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#open-you-project-in-codespaces","ariaLabel":"open you project in 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":"Open you project in Codespaces"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Please refer to "},{"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":"setup-you-dev-environment","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#setup-you-dev-environment","ariaLabel":"setup you dev environment 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":"Setup you dev environment"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Please ensure that "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"abtnode dev"}]},{"type":"text","value":" can work correctly in your project"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In your codespaces:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Run "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"abtnode dev"}]},{"type":"text","value":" to setup you dev environment"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"After successfully starting the dev environment, use "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Command + MouseDown"}]},{"type":"text","value":" to access the link in the 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":"When you open your codespace again, your ABT Node daemon may have been closed. At this point, please run "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"abtnode start"}]},{"type":"text","value":" to start 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":"unable-to-log-in-to-abt-node","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#unable-to-log-in-to-abt-node","ariaLabel":"unable to log in to 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":"Unable to log in to ABT Node"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Currently, the service in Codespaces does not support public access, so the mobile ABT Wallet cannot communicate with the ABT Node in your codespace. A temporary solution is to use "},{"type":"element","tagName":"a","properties":{"href":"https://ngrok.com/"},"children":[{"type":"text","value":"ngrok"}]},{"type":"text","value":" to establish a channel to bypass Codespaces."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ol","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Install 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":"Config ngrok"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Login 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":"Setup ngrok authtoken in your codespace, please refer to "},{"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":"Use ngrok to establish ABT Node access channel"}]},{"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":"After the access channel is successfully established, you can access the ABT Node through the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Forwarding"}]},{"type":"text","value":" address in the Terminal"}]},{"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":"fb0da3f1-fe85-564d-b3ec-36db47472417","language":"en","locale":"en","languages":[{"value":"en","text":"English"},{"value":"zh","text":"简体中文"}],"headings":[{"value":"Config .devcontainer in your project","depth":2},{"value":"Open you project in Codespaces","depth":2},{"value":"Setup you dev environment","depth":2},{"value":"FAQ","depth":2},{"value":"Unable to log in to 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":"/en/developer/blocklet-codespaces","sidebarContent":[{"url":null,"title":null,"pages":[{"title":"ABT Node Docs","path":"/en/"}]},{"url":"/en/introduction","title":"Introduction","pages":[{"title":"ABT Node Overview","path":"/en/introduction/abtnode-overview"},{"title":"ABT Node Setup","path":"/en/introduction/abtnode-setup"},{"title":"ABT Node Access","path":"/en/introduction/abtnode-access"}]},{"url":"/en/marketplace","title":"Marketplace","pages":[{"title":"Find and Install Blocklets","path":"/en/marketplace/find-and-install"},{"title":"Upgrade/downgrade blocklet","path":"/en/marketplace/upgrade-downgrade"}]},{"url":"/en/blocklet","title":"Blocklets","pages":[{"title":"Basic Operations","path":"/en/blocklet/basic-operations"},{"title":"Blocklet Environments","path":"/en/blocklet/environments"},{"title":"Core Blocklets","path":"/en/blocklet/core-blocklets"}]},{"url":"/en/router","title":"Service Gateway","pages":[{"title":"What is Service Gateway?","path":"/en/router/what-is-router"},{"title":"Service Gateway Usage","path":"/en/router/basic-usage"},{"title":"Binding domain names to sites and enabling SSL","path":"/en/router/bind-domain-and-ssl"},{"title":"Certificates for localhost","path":"/en/router/certificates-for-localhost"}]},{"url":"/en/deployment","title":"Deployment","pages":[{"title":"Production Best Practice","path":"/en/deployment/best-practice"},{"title":"Deploy ABT Node Using AWS AMI","path":"/en/deployment/from-aws-ami"},{"title":"Bind domain with reverse proxy server","path":"/en/deployment/behind-reverse-proxy"},{"title":"Run In Docker","path":"/en/deployment/run-in-docker"}]},{"url":"/en/misc","title":"Misc","pages":[{"title":"Node Settings","path":"/en/misc/node-settings"},{"title":"Member Management","path":"/en/misc/member-management"},{"title":"GraphQL Console","path":"/en/misc/graphql-console"}]},{"url":"/en/developer","title":"Developer Guide","pages":[{"title":"Configuring the development environment","path":"/en/developer/config-dev-env"},{"title":"ABT Node CLI","path":"/en/developer/abtnode-cli"},{"title":"Node Configuration","path":"/en/developer/configuration"},{"title":"Storage Structure","path":"/en/developer/storage-structure"},{"title":"Blocklet Specification","path":"/en/developer/blocklet-spec"},{"title":"Create Static Blocklets","path":"/en/developer/static-blocklets"},{"title":"Create DApp Blocklets","path":"/en/developer/dapp-blocklets"},{"title":"Blocklet Hooks","path":"/en/developer/blocklet-hooks"},{"title":"Bundle Blocklets","path":"/en/developer/bundle-blocklets"},{"title":"Publish Blocklets","path":"/en/developer/publish-blocklets"},{"title":"Blocklet Registry","path":"/en/developer/blocklet-registry"},{"title":"Developing Blocklets with Codespaces","path":"/en/developer/blocklet-codespaces"},{"title":"Configure Auth Service for Blocklet","path":"/en/developer/auth-service"},{"title":"Composable blocklet","path":"/en/developer/composable-blocklet"},{"title":"Docker Registry List","path":"/en/developer/docker-registry"}]}],"communityPath":"https://community.arcblockio.cn","githubUrl":"https://github.com/ArcBlock/abtnode-docs/tree/master/src/developer/blocklet-codespaces/index.md"}},"staticQueryHashes":["1358860651","1619896071","1812186216","2194038815"]}