1.2.0 • Published 4 years ago

@gospime/racer-services v1.2.0

Weekly downloads
9
License
MIT
Repository
github
Last release
4 years ago

Plugin for conveniently adding and grabbing services (as in service layer services) to Racer or Derby.js

How to include the plugin:

import path from 'path';
// Create a derby instance
import derby from 'derby';

// `../services` - path to the folder with your services. Every service must have own folder inside of it.
const PATH_TO = path.resolve(__dirname, '../services');

// Include the plugin
derby.serverUse(module, '@gospime/racer-services', PATH_TO);

How to use a sevice inside of your backend application:

// create an instance of service
const service = model.service('some-awesome-service'[, ...parameters]);