mm-client-nodejs

1.1.0 • Public • Published

Matter In Motion. Node.js client

NPM Version NPM Downloads

Node.js client for matter in motion framework

Installation

npm i mm-client-nodejs

Usage

const client = require('mm-client');
 
const mm = client({
  host: 'localhost:3000'
});
 
mm('?').then(res => console.log(res));

client(opts)

Creates a client function. Options:

  • host – string, API host. IP or domain.
  • tls — boolean, default false. Use TLS (https) connection or not.
  • api — string, default /api. API path
  • serializer — serializer to use. By default client uses JSON serializer except for sending files it uses FormData.
  • meat – request metadata, will be used in every request with empty meta

mm(call, data, opts)

Makes a call. Returns a Promise.

  • call — string, resource call
  • data — object, data to send
  • opts

License: MIT

Package Sidebar

Install

npm i mm-client-nodejs

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

6.99 kB

Total Files

8

Last publish

Collaborators

  • velocityzen