A Seneca.js Structure Plugin
seneca-service-loader
Lead Maintainer: Tobias Gurtzick
seneca-service-loader
This module is a plugin for the Seneca framework. It provides you with capabilities to cleanly structure your services.
Usage
To use the service-loader first install the module via
npm i -s seneca-service-loader
Now you can require the plugin and use it, like in the following example:
'use strict'; const Service = ;const seneca = ; const service = seneca;service ;
Now it will allow you to load any file from lib/controllers/*.js. A service looks like this:
'use strict'; moduleexports = pin: 'my:pin,command:name': request: async { return null; }
The example provided here also registers a hapi plugin. Quite simple plugins for hapi do work with this module. Like most database modules. This is intended to produce a better overall experience, by accessing APIs everywhere in the same way.