Centralized functionality for connecting to services.
cd
to the directory you want to work in.npm login
to login to npmjs from the terminal.- Add the package to your
package.json
:npm install @greenchef/service-request --save
- Add the require statement to your files:
require('@greenchef/service-request')
var agenda = require('./lib/agenda');
var service = require('@greenchef/service-request');
return when(service.connectToAgenda('your-uri-here',agenda))
.then(() => { ... });
var service = require('@greenchef/service-request');
return when(service.connectToMongo('your-uri-here'))
.then(() => { ... });
var service = require('@greenchef/service-request');
return when(service.resolveRequest('your-uri-here'))
.then(() => { ... });