holo-dev-server

holo-dev-server lets you develop Holo-enabled UIs locally, without having to connect to a HoloPort. It runs the hApp in a locally simulated Holo Hosting environment.

Usage

    holo-dev-server [OPTIONS] <happ>

      FLAGS:
              --help
                  Prints help information

          -V, --version
                  Prints version information


      OPTIONS:
          -p, --chaperone-port <chaperone-port>
                  Specifies the port for the web server. The chaperone URL that you should pass to WebSDK will be
                  `http://localhost:CHAPERONE_PORT` [default: 24274]
          -h, --hha <hha>
                  If specified installed Holo Hosting App from a .happ file at the given path

                  The HHA version specified must be configured to ignore membrane proofs.
          -s, --servicelogger <servicelogger>
                  If specified, installs servicelogger from a .happ file at the given path


      ARGS:
          <happ>
                  The .happ file to install
      

If you run $ holo-dev-server my_happ.happ, it will spin up a Holochain instance, install a read only copy of your hApp (by passing it the membrane proof with one 0 byte [0]), and make a simulated Holo environment accessible at localhost:24274 (the chaperone URL). You can then use WebSdk.connect('http://localhost:24724', /* opts */) to access the environment.

Downloading

You can download pre-compiled copies of this program from https://holo-host.github.io/envoy-chaperone/

Context

Holo allows you to publish holochain hApps to the HoloPort network, meaning you can host a UI on a centralized web server and have it connect to the decentralized HoloPort network

So rather than having your users run your hApp by installing holochain locally on their own machine, installing your hApp to their local holochain and running a UI for your hApp locally (this is the normal holochain workflow), they can go to "https://yourhappsdomain.com" in their browser, create an account, and use your hApp from anywhere.

holo-dev-server lets you develop Holo-enabled UIs locally, without having to connect to a HoloPort. It runs the hApp in a locally simulated Holo Hosting environment.

Workflow

You need a .happ bundle of your happ as well as a UI that uses web-sdk to make zome calls and get appInfo.

holo-dev-server uses your local holochain and lair-keystore so make sure $ holochain --version is correct before running holo-dev-server. If you use nix-shell for managining holochain versions (recommended), you should enter nix-shell using your happs default.nix before running holo-dev-server.

Once you have the right holochain and lair-keystore in your environment, you can run holo-dev-server

$ holo-dev-server path/to/your.happ

This spins up holochain (and installs your happ), envoy and a local http server serving chaperone. By default, the chaperone server is at http://localhost:24274, that port is configurable.

Update your local UI by passing in this chaperone url when connecting to web-sdk (WebSdk.connect('http://localhost:24724', /* opts */)).

Now when you run your local UI it will be connected to this local Holo environment and you can rapidly test changes.

Compatibility

This version of holo-dev-server is compatible with web-sdk version 0.6.6-prerelease Your holochain version should be compatible with conductor_api version 0.0.36 (eg holochain version 0.0.131)

IMPORTANT: Only compatible with lair-keystore versions 0.1.0 and above. If you get a lair init error on start, this is most likely why

p>