Skip to content

LevInteractive/dwarf-client-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 "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);
  }
}

Releases

No releases published

Packages

No packages published