aboutsummaryrefslogtreecommitdiff
path: root/api/routes/getPeers/index.js
blob: 22da56e36e315024d9049829aa4e5663a7b99bb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
const config = require('../../config');
const fs = require('fs');

module.exports = (req, res) => {
    const path = config.peersFile;
    if(fs.existsSync(path)){
        res.send(JSON.parse(fs.readFileSync(path)));
    } else {
        res.send({"error":"404"})
    }
};