Skip to content

matter-in-motion/mm-client-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Alexey Novikov
Jan 3, 2019
fd49ce1 Β· Jan 3, 2019

History

8 Commits
Apr 3, 2018
Apr 3, 2018
Apr 3, 2018
Apr 3, 2018
Apr 3, 2018
Aug 10, 2018
Jan 3, 2019
Apr 3, 2018
Apr 3, 2018
Apr 3, 2018

Repository files navigation

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.
  • meta – 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