Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Plugin index file
'use strict';
const HauteCouture = require('haute-couture'),
Config = require('./config');
module.exports = (server, options, next) => {
// Get the Confidence object from the server.app object.
const store = server.app.store;
// Load and parse the config for this plugin.
store.load(Config);
const config = store.get('/', { env: server.app.env });
// Merge the local config with any passed in options.
options = Object.assign(options, config);
HauteCouture.using()(server, options, (err) => {
if (err) throw err;
return next();
});
};
module.exports.attributes = {
name: 'plugin-api'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment