UNPKG

coctohug-web

Version:

- Nice localization with support of dozens of languages: [English](https://github.com/raingggg/coctohug/blob/main/readme_en.md), [العربية](https://github.com/raingggg/coctohug/blob/main/readme_ar.md), [Bulgarian](https://github.com/raingggg/coctohug/blob/

24 lines (19 loc) 532 B
var i18n = require('i18n'); const express = require('express'); const router = express.Router(); const { FarmDetail } = require('../models'); const { getFarmDetailStyle } = require('../utils/blockUtil'); router.get('/', async (req, res, next) => { const data = await FarmDetail.findAll({ order: [ ['blockchain', 'ASC'], ] }); data.forEach(dt => { Object.assign(dt, { style: getFarmDetailStyle(dt), }); }) res.render('index', { data, pageName: 'farmDetails' }); }); module.exports = router;