Node.js

Setup

$ npm install berlioz --save

Basic Use

const berlioz = require('berlioz-sdk');

Express.js

const express = require('express');
const app = express();
berlioz.setupExpress(app);

Send HTTP Request to Service

var options = { url: '/items', method: 'GET', json: true };
return berlioz.service('inventory').request(options)
    .then(result => {
        console.log(result);
    })

Send HTTP Request to Cluster

var options = { url: '/items', method: 'GET', json: true };
return berlioz.cluster('inventory').request(options)
    .then(result => {
        console.log(result);
    })