Skip to content

Standardize the use of external libraries across multiple services.

License

Notifications You must be signed in to change notification settings

grevych/gService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gService

Standardize the use of external libraries across multiple services.

Getting Started

Installing

npm install git+ssh://git@github.com/grevych/gService.git

Example

const request = require('request-promise');
const gService = require('gService');
const dependencies = require('../package.json').dependencies;


const gatewayName = 'requester';
const serviceName = 'request-promise';
const options = {
  url: 'https://status.github.com/api/',
  version: dependencies[serviceName]
};

const requester = gService.create(gatewayName, serviceName, options);
requester.setModule(request);
requester.request('status.json')
  .then(response => {
      console.log('Github status: %s', response.body.status);
      console.log('Last update: %s', response.body.last_updated);
  });

About

Standardize the use of external libraries across multiple services.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published