brainz-social-old/routes/.well-known/nodeinfo.js

20 lines
483 B
JavaScript

'use strict';
const express = require('express');
module.exports = {
/**
* @param {express.IRoute} routeObj
*/
route: (routeObj) => {
routeObj.get(async (req, res, _next) => {
res.json({
"links": [{
"rel": "http://nodeinfo.diaspora.software/ns/schema/2.0",
"href": `https://${req.headers.host}/nodeinfo/2.0`
}]
});
res.end();
});
}
};