{"id":18584464,"url":"https://github.com/ipfs-examples/helia-script-tag","last_synced_at":"2026-01-26T04:03:05.920Z","repository":{"id":164404800,"uuid":"623521411","full_name":"ipfs-examples/helia-script-tag","owner":"ipfs-examples","description":"Using Helia in the browser via a script tag","archived":false,"fork":false,"pushed_at":"2025-05-01T08:39:12.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-16T05:37:28.679Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ipfs-examples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-04T14:34:54.000Z","updated_at":"2025-05-01T07:36:36.000Z","dependencies_parsed_at":"2024-01-19T16:42:51.475Z","dependency_job_id":"f829134e-f504-40c3-a6b7-f47657589845","html_url":"https://github.com/ipfs-examples/helia-script-tag","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"ipfs-examples/example-fork-go-template","purl":"pkg:github/ipfs-examples/helia-script-tag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-script-tag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-script-tag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-script-tag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-script-tag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ipfs-examples","download_url":"https://codeload.github.com/ipfs-examples/helia-script-tag/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ipfs-examples%2Fhelia-script-tag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28766369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T03:54:34.369Z","status":"ssl_error","status_checked_at":"2026-01-26T03:54:33.031Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T00:27:37.622Z","updated_at":"2026-01-26T04:03:05.906Z","avatar_url":"https://github.com/ipfs-examples.png","language":"HTML","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ipfs/helia\" title=\"Helia\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/ipfs/helia/main/assets/helia.png\" alt=\"Helia logo\" width=\"300\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003e\u003cb\u003eUsing Helia via \u003ccode\u003e\u003cscript/\u003e\u003c/code\u003e tags from CDN\u003c/b\u003e\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/jlord/forkngo/gh-pages/badges/cobalt.png\" width=\"200\"\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://ipfs.github.io/helia/modules/helia.html\"\u003eExplore the docs\u003c/a\u003e\n  .\n  \u003ca href=\"https://codesandbox.io/p/sandbox/helia-script-tag-vptxml\"\u003eView codesandbox Demo\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/ipfs-examples/helia-examples/issues\"\u003eReport Bug\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/ipfs-examples/helia-examples/issues\"\u003eRequest Feature/Example\u003c/a\u003e\n\u003c/p\u003e\n\n## Table of Contents\n\n- [About The Project](#about-the-project)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation and Running example](#installation-and-running-example)\n- [Usage](#usage)\n- [Documentation](#documentation)\n- [Contributing](#contributing)\n- [Want to hack on IPFS?](#want-to-hack-on-ipfs)\n\n## About The Project\n\n- Read the [docs](https://ipfs.github.io/helia/modules/helia.html)\n- Look into other [examples](https://github.com/ipfs-examples/helia-examples) to learn how to spawn a Helia node in Node.js and in the Browser\n- Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it\n- Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs\n- Check out https://docs.ipfs.io for tips, how-tos and more\n- See https://blog.ipfs.io for news and more\n- Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io\n\n## Getting Started\n\n### Prerequisites\n\nMake sure you have installed all of the following prerequisites on your development machine:\n\n- Git - [Download \u0026 Install Git](https://git-scm.com/downloads). OSX and Linux machines typically have this already installed.\n- Node.js - [Download \u0026 Install Node.js](https://nodejs.org/en/download/) and the npm package manager.\n\n### Installation and Running example\n\n```console\n\u003e npm install\n\u003e npm start\n```\n\nThen open your browser to http://localhost:8888.\n\n## Usage\n\nThis example is basic demo and proof of concept for using helia via script tags. Other examples use build-scripts that may be too complicated for your needs. If you have a website where you manage your dependencies via script tags in an HTML file, you may benefit from looking at this example instead of the others at https://github.com/ipfs-examples/helia-examples/tree/main/examples.\n\nIf you are seeing errors like `ERR_REQUIRE_ESM` or `ERR_PACKAGE_PATH_NOT_EXPORTED` when trying to use this example, please check out `/examples/helia-cjs` instead.\n\nThe main areas of focus should be two files: `index.html` and `src/index.js`.\n\nIf you're confused about what the different methods under 'Some Suggestions' are doing, you may want to check out [helia-101](https://github.com/ipfs-examples/helia-101) for a full breakdown of the code.\n\n### Using the example\n\nThe page you will see is broken up into 4 sections:\n\n1. The intro: title and global variables you can play with in your browser console\n2. Node Status: The status of the helia node, which is updated every 500ms\n   * Helia will start up on page load. You can use the 'Start Helia' and 'Stop Helia' to call `helia.start()` and `helia.stop()` respectively.\n   * Updated content (look for `nodeUpdateInterval = ` in `src/index.js` to change or edit what's updated):\n      * Node Status - shows either \"Online\" or \"Offline\".\n      * ID - Shows the PeerId of your Helia node.\n      * Discovered Peers - The count of peers discovered. Check the event log at the bottom of the page to see their IDs.\n      * Connected Peers - The count of peers your helia node is connected to. Also, a list of their `PeerId`s will render if the count is \u003e 0.\n3. Suggestions: Try out these code snippets in your browser terminal, in order.\n4. Event Log: Elapsed-TimeStamped messages showing you some of what Helia and it's managed libp2p node are doing. This event log shows:\n   * instantiation of the libp2p instance passed to helia\n   * instantiation of the Helia node\n   * peer discovery\n   * peer connection\n   * peer disconnection\n\n_For more examples, please refer to the [Documentation](#documentation)_\n\n## Documentation\n\n- [IPFS Primer](https://dweb-primer.ipfs.io/)\n- [IPFS Docs](https://docs.ipfs.io/)\n- [Tutorials](https://proto.school)\n- [More examples](https://github.com/ipfs-examples/helia-examples)\n- [API - Helia](https://ipfs.github.io/helia/modules/helia.html)\n- [API - @helia/unixfs](https://ipfs.github.io/helia-unixfs/modules/helia.html)\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the IPFS Project\n2. Create your Feature Branch (`git checkout -b feature/amazing-feature`)\n3. Commit your Changes (`git commit -a -m 'feat: add some amazing feature'`)\n4. Push to the Branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Want to hack on IPFS?\n\n[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)\n\nThe IPFS implementation in JavaScript needs your help! There are a few things you can do right now to help out:\n\nRead the [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md) and [JavaScript Contributing Guidelines](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md).\n\n- **Check out existing issues** The [issue list](https://github.com/ipfs/helia/issues) has many that are marked as ['help wanted'](https://github.com/ipfs/helia/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22help+wanted%22) or ['difficulty:easy'](https://github.com/ipfs/helia/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Adifficulty%3Aeasy) which make great starting points for development, many of which can be tackled with no prior IPFS knowledge\n- **Look at the [Helia Roadmap](https://github.com/ipfs/helia/blob/main/ROADMAP.md)** This are the high priority items being worked on right now\n- **Perform code reviews** More eyes will help\n  a. speed the project along\n  b. ensure quality, and\n  c. reduce possible future bugs\n- **Add tests**. There can never be enough tests\n\n[cid]: https://docs.ipfs.tech/concepts/content-addressing  \"Content Identifier\"\n[Uint8Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n[libp2p]: https://libp2p.io\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipfs-examples%2Fhelia-script-tag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fipfs-examples%2Fhelia-script-tag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fipfs-examples%2Fhelia-script-tag/lists"}