{"size": 499, "ext": "js", "max_stars_repo_path": "app/node/src/server/routes/peers.js", "max_stars_repo_name": "kslat3r/blockchainj", "max_stars_repo_stars_event_min_datetime": "2018-01-04T11:59:51.000Z", "max_stars_repo_stars_event_max_datetime": "2018-03-23T14:34:58.000Z", "max_issues_repo_path": "app/node/src/server/routes/peers.js", "max_issues_repo_name": "kslat3r/blockchainj", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/node/src/server/routes/peers.js", "max_forks_repo_name": "kslat3r/blockchainj", "max_forks_repo_forks_event_min_datetime": "2017-09-28T15:42:25.000Z", "max_forks_repo_forks_event_max_datetime": "2017-09-28T15:42:25.000Z"}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 20.7916666667, "max_line_length": 49, "alphanum_fraction": 0.5951903808}
const express = require('express');
const router = express.Router();
const logger = require('../../logger');
const node = require('../../node');

/**
 * @swagger
 * /peers:
 *   get:
 *     description: Get all peers of this node
 *     produces:
 *       - application/json
 *     responses:
 *       200:
 *         description: Peers
 */
router.get('/peers', function(req, res) {
  logger.debug('EVENT peers:get');

  res.send(node.getPeers({ includeSelf: true }));
});

module.exports = router;
