Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm Build Status

plugo

Dynamically expose modules to hapi plugins from a given path.

Usage

const Plugo = require('plugo');

exports.register = (plugin, options, next) => {
  var plugoptions = {
    name: 'handlers',
    path: __dirname + '/handlers'
  };
  
  // Exposes modules in the handlers folder to this plugin
  Plugo.expose(plugoptions, plugin, next);
};

exports.register.attributes = {
  name: 'controllers'
};

Options

The following options are available:

  • name: Defines property name under plugin [required]
  • path: Specifies which folder to load files [required]
  • extension: Specifies which file extension to look for (defaults to .js) [optional]

About

Dynamically expose modules to hapi plugins

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages