Created
April 5, 2015 02:01
-
-
Save joaoneto/b2a75b68fc7be502e58b to your computer and use it in GitHub Desktop.
Try hoodie hooks :P
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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