npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ipscend

v0.4.3

Published

Web Application publishing made simple and distributed with IPFS

Downloads

50

Readme

ipscend

Dependency Status js-standard-style

Web Application publishing, simple and distributed with IPFS

Usage

Install via npm

$ npm install ipscend --global

Run the CLI to show the available commands

$ ipscend
Usage: ipscend COMMAND [OPTIONS]

Available commands:

browse      Open your application in a browser
init        Initialize a ipscend project
ipfs start  Start your a local IPFS node
preview     Preview your application before you publish it
publish     Publish your project
screenshot  View or generate screenshots for your application
versions    Check each version published

commands

ipscend browse

Opens the last published version of your application in the browser.

ipscend init

Initializes your project. Asks for the folder where the web application will be available and stores an ipscend.json object in your current path to store all the metadata it generates, such as published versions and taken screenshots.

ipscend ipfs start

Start and init an IPFS node (in case you don't want to install and run IPFS yourself)

ipscend preview

Serves your application on a local static file server, so that you can try it out before you feel ready to publish it.

ipscend publish

Publishes the current state of your application to IPFS and stores a reference to it.

Note: You have to have a local IPFS node running in order to publish, check below for how to get your local IPFS node running.

ipscend screenshot

Opens a screenshot preview of all the published versions of your app. In order to generate the screenshots, you must first run ipscend screenshot --gen.

Note: The webapp used for this is ipscend-screenshot-visualizer.

ipscend versions

Prints out the published versions for the app and its respective timestamp.

Note: In order to use this feature, you must set API_ORIGIN=* as an environment variable before running your IPFS node.

Use IPFS to host your webpage using a standard domain (includes cool DNS trick!)

If you are looking into having your application accesible through youdomain.com, instead of referencing it by a /ipfs/hash, we have a solution for you.

Every IPFS node HTTP interface checks the host header when it receives a request from a browser, then it performs a DNS lookup for a TXT Record, looks if there is any MerkleLink available, and, if there is, it performs a lookup, caching that path and serving it as if it was a static webserver.

To make this work, simply:

  1. Publish your application using ipscend publish.

  2. Save the returned hash.

  3. Find the IPFS ip addresses using $ dig ipfs.io. Example:

    $ dig +short ipfs.io
    178.62.61.185
    178.62.158.247
    104.236.76.40
    ...
  4. Decide which domain or subdomain will host your IPFS application. We're going to use ipfs.yourdomain.com

  5. In the DNS administration for your domain, add an A record for each of the ipfs.io IPs addresses. Example:

    yourdomain.com
    
    ipfs     A     178.62.61.185
    ipfs     A     178.62.158.247
    ipfs     A     104.236.76.40
    ...

    If you're using the root domain, your DNS rules should look like:

    yourdomain.com
    
    @        A     178.62.61.185
    @        A     178.62.158.247
    @        A     104.236.76.40
    ...
  6. Next, the cool DNS trick. Add a TXT record with the hash of your IPFS application. Example:

    yourdomain.com
    
    ipfs     TXT     dnslink=/ipfs/QmXkbSsxHZZniJ1rd5y7cJsDYyRKkcYeoEsN7p4PUq799L
  7. Wait a little bit for DNS to propagate.

  8. Open ipfs.yourdomain.com and see that your page was loaded!

Voilá, your page is now cached and is being served by IPFS.

Note: You can also host your own IPFS nodes and use the same DNS trick.

Automate the DNS TXT Record update with dnslink tool

dnslink-deploy is a simple tool that lets you update your TXT records to the latest hash, if you happen to be using Digital Ocean's nameservers. To update it using the tool, simply run:

dnslink-deploy -d yourDomain -r @ -p /ipfs/QmeQT76CZLBhSxsLfSMyQjKn74UZski4iQSq9bW7YZy6x8

To learn more about how the tool works, visit https://github.com/ipfs/dnslink-deploy and to learn how to set up your domain with Digital Ocean's name servers, go to: https://www.digitalocean.com/community/tutorials/how-to-point-to-digitalocean-nameservers-from-common-domain-registrars