forked from hserang/host-meta-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
18 lines (15 loc) · 745 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var express = require('express');
var HostMetaController = require(__dirname+'/controllers/host_meta_controller.js');
var WebFingerController = require(__dirname+'/controllers/webfinger_controller.js');
function HostMetaWebFingerPlugin(options) {
var router = new express.Router();
var hostMetaController = new HostMetaController({
gatewayd: options.gatewayd
});
var webFingerController = new WebFingerController(options);
router.get('/host-meta', hostMetaController.get.bind(hostMetaController));
router.get('/host-meta.json', hostMetaController.get.bind(hostMetaController));
router.get('/webfinger', webFingerController.get.bind(webFingerController));
this.router = router;
}
module.exports = HostMetaWebFingerPlugin;