Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

pip-services3-rpc-node

Remote procedure calls for Pip.Services in Node.js

pip.services, microservice, communication, rpc, rest, library

readme

Pip.Services Logo
Remote Procedure Calls for Pip.Services in Node.js

This module is a part of the Pip.Services polyglot microservices toolkit.

The rpc module provides the synchronous communication using local calls or the HTTP(S) protocol. It contains both server and client side implementations.

The module contains the following packages:

  • Auth - authentication and authorization components
  • Build - HTTP service factory
  • Clients - mechanisms for retrieving connection settings from the microservice’s configuration and providing clients and services with these settings
  • Connect - helper module to retrieve connections for HTTP-based services and clients
  • Services - basic implementation of services for connecting via the HTTP/REST protocol and using the Commandable pattern over HTTP

Quick links:

Use

Install the NPM package as

npm install pip-services3-rpc-node --save

Develop

For development you shall install the following prerequisites:

  • Node.js 8+
  • Visual Studio Code or another IDE of your choice
  • Docker
  • Typescript

Install dependencies:

npm install

Compile the code:

tsc

Run automated tests:

npm test

Generate API documentation:

./docgen.ps1

Before committing changes run dockerized build and test as:

./build.ps1
./test.ps1
./clear.ps1

Contacts

The Node.js version of Pip.Services is created and maintained by:

  • Volodymyr Tkachenko
  • Sergey Seroukhov
  • Mark Zontak

The documentation is written by:

  • Mark Makarychev

changelog

Pip.Services Logo
Remote Procedure Calls for Pip.Services in Node.js Changelog

3.9.2 (2022-05-20)

Bug Fixes

  • HttpResponseSender fixed sendError addind error type and category

3.9.1 (2021-10-29)

Bug Fixes

  • services Fixed bug with formatting ArraySchema in swagger document

3.9.0 (2021-10-21)

Features

  • services Added RegRxp supporting to interceptors Examples:
    • the interceptor route "/dummies" corresponds to all of this routes "/dummies", "/dummies/check", "/dummies/test"
    • the interceptor route "/dummies$" corresponds only for this route "/dummies". The routes "/dummies/check", "/dummies/test" aren't processing by interceptor Please, don't forgot, route in interceptor always automaticaly concateneted with base route, like this service_base_route + route_in_interceptor. For example, "/api/v1/" - service base route, "/dummies$" - interceptor route, in result will be next expression - "/api/v1/dummies$"

3.8.0 (2021-07-29)

Features

  • services Added configuration for CORS headers and origins

3.7.0 (2021-04-21)

Features

  • clients Added TestRestClient
  • clients Added TestCommandableHttpClient

3.6.1 (2021-04-07)

Bug Fixes

  • clients Added PATCH method into RestClient

3.5.2 (2021-03-5)

Bug Fixes

  • clients Updated createRequestRoute method

3.5.1 (2021-03-5)

Features

  • services Added working with correlationId in headers
  • clients Added working with correlationId in headers

Bug Fixes

  • clients Fixed bug with empty route in createRequestRoute method

3.5.0 (2021-02-21)

Features

  • services Added integration with Swagger UI

3.4.0 (2021-02-18)

Features

  • services Added processing correlation-id header

3.3.3 (2021-02-10)

Features

  • Updated to the latest Restify version

Bug Fixes

3.2.2 (2020-04-08)

Features

  • connect HTTPS connection resolution with no credentials implemented for internal networks
  • tests Added the color switch to the mocha task
  • log Implemented a configurable date format for the elasticsearch index pattern.

Bug Fixes

  • Fixed the container logging about opening a rest client.
  • Fixed the commandable service and client work with correlation id issues.
  • Fixed the call counter metrics labels issue.

3.2.1 (2019-11-22)

Features

  • options Added option for protocol upgrade

3.1.0 (2019-02-04)

Features

  • auth Added authorizers: BasicAuthorizer, OwnerAuthorither and RoleAuthorither
  • connect HttpConnectionResolver now supports HTTPS certificates
  • services HttpEndpoint now supports HTTPS protocol and maintenance mode
  • services Added RestOperations, AboutOperations, HeartbeatOperations and StatusOperations
  • services Added registerRouteWithAuth and registerInterceptor methods in RestService

2.9.0 (2018-04-05)

Features

  • status Made HeartbeatRestService route configurable
  • status Made StatusRestService route configurable

2.8.0 (2018-03-24)

Features

  • status Added HeartbeatRestService
  • status Added StatusRestService

2.7.0 (2018-03-05)

Features

  • rest Added HttpEndpoint

2.6.0 (2017-05-15)

Features

  • rest Added HttpConnectionResolver
  • mqtt Added MqttConnectionResolver
  • mqtt Added MqttMessageQueue

2.5.1 (2017-04-13)

Bug Fixes

  • Fixed schema validation

2.5.0 (2017-05-01)

Features

  • messaging Changed MessageEnvelop.message to binary Buffer

2.4.0 (2017-04-18)

Features

  • rest Added HttpRequestDetector class
  • rest Added sendEmptyResult() to HttpResponseSender

Breaking changes

  • Renamed ResponseSender to HttpResponseSender

2.3.0 (2017-04-02)

Breaking changes

  • Renamed CommandableRestClient to CommandableHttpClient
  • Renamed CommandableRestService to CommandableHttpService

2.2.3 (2017-03-29)

Bug Fixes

  • Fixed callback in RestClient.close
  • Improved controller reference handling in direct client
  • Added handling empty callbacks in commandable clients

2.2.0 (2017-03-26)

Features

  • direct Added _dependencyResolver
  • seneca Added CommandableSenecaService and CommandableSenecaClient
  • rest Added CommandableRestService and CommandableRestClient

2.1.3 (2017-03-21)

Bug Fixes

  • Made opening of SenecaClient and SenecaService asynchronous to avoid handup during plugin initialization

2.1.0 (2017-03-16)

Features

  • seneca Added SenecaPlugin

2.0.9 (2017-03-15)

Bug Fixes

  • Fixed local seneca connections

2.0.0 (2017-02-27)

Breaking Changes

  • Migrated to pip-services 2.0
  • Renamed IMessageQueue.getMessageCount to IMessageQueue.readMessageCount

1.0.0 (2017-01-28)

Initial public release

Features

  • messaging Abstract and in-memory message queues
  • rest RESTful service and client
  • seneca Seneca service and client

Bug Fixes

No fixes in this version