Skip to content

Instantly share code, notes, and snippets.

@joaoneto

joaoneto/static.js

Created Apr 5, 2015
Embed
What would you like to do?
Try hoodie hooks :P
var appName = require('./package.json').name
|| require('../../package.json').name;
var ports = require('ports');
var port = ports.getPort(appName + '-hoodie-plugin-social');
module.exports = {
// 'server.pack.post': function (pack) {
// console.log('hook: server.pack.pre called');
// },
'server.pack.pre': function (pack) {
console.log('hook: server.pack.pre called');
pack.register({
name: 'social',
version: '0.10.10',
register: function (plugin, options, next) {
console.log('Hu3Hu3 Br 2');
plugin.route({
method: '*',
path: '/_auth/{p*}',
handler: {
proxy: {
passThrough: true,
port: port,
protocol: 'http'
}
});
next();
},
// options: { message: 'hello' }
}, function (err) {
console.log('Hu3Hu3 Br 3');
if (err) {
console.log('Failed loading plugin');
}
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.