mirror of
https://github.com/GOSTSec/gostexplr
synced 2025-01-15 01:00:16 +00:00
19 lines
380 B
JavaScript
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;
|