0.9.0 • Published 9 years ago
hapi-plugin-loader v0.9.0
hapi-plugin-loader
Automatically loads plugins from a directory.
Installation
npm install hapi-plugin-loader
Usage
server.register({
  register: require('hapi-plugin-loader'),
  // options: {}
});Options
path- Defaults to${process.cwd()}/plugins
Methods
Each plugin should be a file in the plugins directory.
Each plugin should export either a plugin or a plugin-load object.
Example:
module.exports = {
	register: require("my-plugin"),
	options: {
		cache: {
			expiresIn: 60 * 60 * 1000
		}
	}
}0.9.0
9 years ago