@gospime/racer-services

1.2.0 • Public • Published

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]);

/@gospime/racer-services/

    Package Sidebar

    Install

    npm i @gospime/racer-services

    Weekly Downloads

    2

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    5.41 kB

    Total Files

    8

    Last publish

    Collaborators

    • kolegm