Introduction
This modules provides the mechanism to integrate with 3rd party Git Providers.
Objective
Git Repositories
Git Repositories contain your code that can be categories as one of the 3 options below:
- Microservice
- Daemon
- Multi Repo
When activating a repository, the Dashboard attempts to load a config.js file from the root level of that repository and parse it to learn what this repository contains.
Once a repository is activated and based on what it contains, you will be able to see a new service/daemon.
Microservice
A microservice is a Restful HTTP server that contains APIs. Click here to see how to build a microservice.
If the repository contains only 1 microservice, then the config.js file should have a schema similar to:
'use strict'; module.exports = { type: 'service', //type is service prerequisites: { cpu: '', memory: '' }, serviceVersion: 1, serviceName: "example03", serviceGroup: "SOAJS Example Service", requestTimeout: 30, requestTimeoutRenewal: 5, servicePort: 4012, extKeyRequired: true, session: true, oauth:true, errors: {}, schema: { //api list } };
SOAJS needs the following properties to be static in order to identify it as a service :
Key | Value (example) |
---|---|
serviceVersion | 1 |
serviceName | example03 |
serviceGroup | SOAJS Example Service |
servicePort | 4012 |
Daemon
A Daemon is nodeJS script that supplies jobs to be executed in a certain order. Click here to see how to build a daemon.
If the repository contains only 1 daemon, then the config.js file should have a schema similar to:
'use strict'; module.exports = { 'type': 'daemon', //type is daemon 'prerequisites': { 'cpu': '', 'memory': '' }, 'serviceName': 'myDaemon', 'serviceGroup': 'myDaemonGroup', 'servicePort': 4177, 'errors': { 400: 'Mongo Database connection error', 401: 'Error while executing Count Query.', 402: 'Model not found' }, 'schema': { //job list } };
SOAJS needs the following properties to be static in order to identify it as a daemon :
Key | Value (example) |
---|---|
serviceName | myDaemon |
serviceGroup | myDaemonGroup |
servicePort | 4177 |
Multi Repo
A multi repo is a collection of any of the above.
If the repository contains a multi repo, then the config.js file should have a schema similar to:
"use strict"; module.exports = { "type":"multi", "folders": [ "mySrv1/", //service "myDaemon/", //daemon "myUI/", //static content "mySrv2/" //service ] };
Add Comment