You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
419 B

const tor = require('../lib/tor');
const bandwidthChart = require('../lib/bandwidth-chart');
module.exports = (req, res, next) => {
Promise.all([
tor.node(req.params.id),
tor.bandwidth(req.params.id)
])
.then(data => res.render('node.html', {
node: data[0],
bandwidth: bandwidthChart(data[1])
}))
.catch(error => res.render('node.html', {
error: error
}));
}