nodezoo / nodezoo-github

nodezoo-github
http://github.com/nodezoo/tao
8 stars 36 forks source link

nodezoo-github

Build Status Gitter Chat

This is a repository in the microservice demonstration system for the Tao of Microservices book (chapter 9). This code is live at nodezoo.com. To get started, visit the nodezoo/tao repository.

This microservice provides the github module data functionality.

Running

To run this microservice normally, use the tooling describing in the nodezoo/tao repository, which shows you how to run the entire system of microservices (of which this is only one of many) in production (Kubernetes), staging (Docker), and development (fuge) modes.

To run from the terminal for testing and debugging, see the Running from the terminal section below.

Message flows

The table shows how this microservice acts on the Accepted message patterns and performs appropriate business Actions, as a result of which, new messages are possibly Sent.

Accepted Actions Sent
role:github,cmd:get (SC) Get github data about a module
role:info,need:part (AO) Provide partial module information role:info,collect:part (AO)

(KEY: A: asynchronous, S: synchronous, O: observed, C: consumed)

Service interactions

github

Testing

Unit tests are in the test folder. To run, use:

$ npm test

Note that this is a learning system, and the tests are not intended to be high coverage.

Running from the terminal

This microservice is written in node.js, which you will need to download and install. Fork and checkout this repository, and then run npm inside the repository folder to install its dependencies:

$ npm install

To run this microservice separately, for development, debug, or testing purposes, use the service scripts in the srv folder: