nonstop-registry-resource

Registry HTTP API as a resuable resource lib for Autohost

Usage no npm install needed!

<script type="module">
  import nonstopRegistryResource from 'https://cdn.skypack.dev/nonstop-registry-resource';
</script>

README

nonstop registry resource

This module can be used to provide the nonstop service hosts with a regsitration hypermedia API to any autohost server that's using hyped.

Why?

The service hosts register themselves and push status on an interval to provide a centralized source of information about what hosts are up and what package they're running.

Using with Autohost

NPM install this module to your project

npm install nonstop-registry-resource hyped -S

Add the module to the modules property in your autohost init:

var hyped = require( 'hyped' );
var host = require( 'autohost' );

host.init( {
        port: 8888,
        noOptions: true,
        urlStrategy: hyped.urlStrategy,
        modules: [ 'nonstop-registry-resource' ]
    } )
    .then( hyped.addResources );
hyped.setupMiddleware( host );