1
0
mirror of https://github.com/GOSTSec/gostexplr synced 2025-01-15 01:00:16 +00:00
gostexplr/routes/index.js
2018-02-06 22:29:42 +05:00

19 lines
380 B
JavaScript

var models = require('../models');
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', async function(req, res, next) {
const blocks = await models.Block.findAll({
attributes: ['height', 'hash'],
order: [['height', 'DESC']],
limit: 30,
});
res.render('index', {
blocks,
});
});
module.exports = router;