0.1.3 • Published 5 years ago

@microhq/node-client v0.1.3

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
5 years ago

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

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago