3.0.3 • Published 2 years ago

pip-services3-facade-node v3.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

RESTful client facade for Node.js

Important: This module has been deprecated. Please, use RestOperations from pip-services3-rpc-node instead.

One of the common implementation patterns is to expose microservices via single entry point called API Gateway or Client Facade. The responsiblity of that component is to accept calls from external consumers, enforce security rules, perform authentication and authorization and when request is cleared it can call one or few microservices in a single transaction. Client Facades may also implement complex requests, combine multiple datasets and return then in a single transaction, push notifications via async mechanisms like Socket.IO or WebSockets.

This module is a part of the Pip.Services polyglot microservices toolkit. It provides reusable primitives to quickly build sophisticated client facades via composition of multiple routes and middleware components.

  • Auth - Authentication and authorization components
  • Build - Contains a factory for constructing facade components
  • Container - Facade launch container
  • Operations - Basic facade operations called by clients
  • Services - Main and partition (subpath) facade services
  • Routes - Abstract facade route class and few generic routes
  • Errors - Error simulation

Quick links:

Use

Install the NPM package as

npm install pip-services3-facade-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 Sergey Seroukhov