Skip to content

Latest commit

 

History

History
79 lines (48 loc) · 3.25 KB

DEVELOPMENT.md

File metadata and controls

79 lines (48 loc) · 3.25 KB

Developer Notes

This page shows how to set up basic development environment and how to test this project.

Getting Started

Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:

Installation and Running example

> npm install
> npm start

Now open your browser at http://localhost:3333

If you are editing code actively and wanting to see the changes, you will want to use the 3333 port because the IPFS hosted content is generated at build time and the x-forwarded-host header and stubbed DNSLink of ipfs-host.local will still be pointing to the old content.

Enabling subdomains

Subdomains are enabled by default when you run npm start. You will want to access the service worker gateway via a reverse proxy that ensures subdomain support:

  • http://localhost:3333
  • http://localhost:3334

Testing without subdomains

Unless you have some other reverse proxy setup, you can access a path-only gateway by accessing:

  • http://localhost:8345
  • http://127.0.0.1:8345
  • http://127.0.0.1:3333
  • http://127.0.0.1:3334

Demo links

Pre-reqs

You have to visit the landing page first, and make sure the SW is loaded. Once it is, the below links should work for you.

Notes:

  • ⚠️ Deployment of this service worker on environments that don't enable subdomain pathing is not recommended. Path-only gateways do not provide Origin isolation. NEVER use path-only gateways for loading dapps with sensitive information such as keys, passwords, wallets.
  • Attempting a few refreshes, clearing site data (cache/cookies/sw/indexDb/etc..), etc, may resolve your problem (though may be indicative of issues you can fix with a PR!)
  • Some content-types are not previewable with certain browsers. If you receive a download prompt you didn't expect: double check the returned content-type and make sure your browser supports previewing that content-type.

Links

Static website and it's nested content

Single images

Videos

IPNS paths

DNSLink paths

  • TBD