@work_taps/dwarf-client

1.2.0 • Public • Published

gRPC client for Dwarf

Use with dwarf microservice on a node web server. Use DWARF_GRPC_SERVER env var to set the gRPC server.

import { shorten } from "@work_taps/dwarf-client";

async function main() {
  try {
    const shortenedUrls = await shorten(["http://google.com", "http://whatever.com"]);
    console.log(shortenedUrls); // -> { urls: ["short-link-1", "short-link-2"] }
  } catch (err) {
    console.error(err);
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @work_taps/dwarf-client

Weekly Downloads

0

Version

1.2.0

License

ISC

Unpacked Size

5.06 kB

Total Files

8

Last publish

Collaborators

  • work_taps