@microhq/node-client
Generic client for all Micro services.
Last updated 3 months ago by crufter .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @microhq/node-client 
SYNC missed versions from official npm registry.

Micro Node Client

This package can be used to call any service on Micro.

Please also check the typesafe autogenerated APIs for your Micro services, you might find them more pleasant to use.

Installation:

npm install --save @microhq/node-client

Usage

const { Client } = require("@microhq/node-client");

new Client().call("go.micro.srv.greeter", "Say.Hello", {"name": "John"}).then(response => {
	console.log(response)
})

The output will be:

{ msg: 'Hello John' }

You can also connect to your local micro installation:

new Client({local: true})

If you want to change the address, assuming you run the client api:

new Client({address: "https://api.mydomain.com/client"})

Current Tags

  • 0.1.3                                ...           latest (3 months ago)

4 Versions

  • 0.1.3                                ...           3 months ago
  • 0.0.17                                ...           3 months ago
  • 0.0.16                                ...           3 months ago
  • 0.0.15                                ...           3 months ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (4)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |