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

chia-web2-gateway

v1.0.10

Published

ChiaWeb2Gateway is a gateway for hosting and accessing web content on the Chia network via the DataLayer protocol. The gateway allows you to create a datastore, publish content to it, and access the content using a web browser.

Downloads

31

Readme

ChiaWeb2Gateway

ChiaWeb2Gateway is a gateway for hosting and accessing web content on the Chia network via the DataLayer protocol. The gateway allows you to create a datastore, publish content to it, and access the content using a web browser.

Features

  • Serve static websites from the Chia network using DataLayer.
  • Support for Single Page Applications (SPAs) by redirecting all not-found routes to the base path.
  • Serve multipart files by stitching together file parts, with caching for repeated access.
  • Automatically embed the correct base URL in index.html files to ensure correct relative path resolution.

Getting Started

Prerequisites

You will need Node.js installed on your system to run and test this application. Also, it's crucial that Chia Wallet and Chia Datalayer must be running while using this software.

Installation

  1. Clone the repository to your local machine:

    git clone https://github.com/MichaelTaylor3D/ChiaWeb2Gateway.git
  2. Navigate into the cloned directory:

    cd ChiaWeb2Gateway
  3. Install the required dependencies:

    npm install

Configuration

The gateway can be configured by changing the values in defaultConfig located in ./utils/defaultConfig.js. The configuration parameters are as follows:

  • FULL_NODE_HOST: The hostname of the full node.
  • DATALAYER_HOST: The hostname of the data layer.
  • WALLET_HOST: The hostname of the wallet.
  • CERTIFICATE_FOLDER_PATH: The path to the certificate folder.
  • DEFAULT_WALLET_ID: The default wallet ID.
  • WEB2_GATEWAY_PORT: The port for the gateway server.
  • WEB2_BIND_ADDRESS: The bind address for the gateway server.

Usage

To start the gateway server:

node server.js start

If you install this module as a local or global npm module, you can run

chiaweb2 start

The server will start and display a console message with the server's URL.

Integration in Your Own Projects

You can easily integrate ChiaWeb2Gateway into your own projects:

const gateway = require("chia-web2-gateway");
gateway.start();

This will start the gateway server within your application.

Support

If you find this project useful, please consider supporting our work. You can send contributions to the following Chia address:

xch17edp36nd9m5jfcq2sa5qp25ekrrfguvpx05zce35pf65mlvfn4gqyl0434

Your support is greatly appreciated!