Skip to content

Latest commit

 

History

History
77 lines (55 loc) · 2.01 KB

Deployment.md

File metadata and controls

77 lines (55 loc) · 2.01 KB

Deployment Guide
Party Activities Microservice

Party activities microservice can be used in different deployment scenarios.

Standalone Process

The simplest way to deploy the microservice is to run it as a standalone process. This microservice is implemented in JavaScript and requires installation of Node.js. You can get it from the official site at https://nodejs.org/en/download

Step 1. Download microservices by following instructions

Step 2. Add config.json file to the root of the microservice folder and set configuration parameters. See Configuration Guide for details.

Step 3. Start the microservice using the command:

node run

Seneca Plugin

The SysLog microservice can also be used as a Seneca plugin. To learn more about Seneca microservices framework to go http://senecajs.org

Step 1. Include dependency into package.json file:

{
    ...
    "dependencies": {
        ....
        "service-activities-node": "^1.0.*",
        ...
    }
}

Then install dependencies using npm

# Install dependencies
npm install

# Update existing dependencies
npm update

Step 2. Load seneca plugin within your code.

Configuration parameters for the plugin are identical to the microservice configuration. See Configuration Guide for details.

var seneca = require('seneca')();

var config = {
    logger: { 
        level: 'debug'
    },
    persistence: {
        type: 'file',
        path: 'activities.json'
    }
};

var plugin = require('service-activities-node').ActivitiesSenecaPlugin;

seneca.use(pugin, config);

You can use the microservice by calling seneca commands directly as described in Seneca Protocol or by using ActivitiesSenecaClient