Files
Emmelia-Link-Flayer-Rewrite/routes/index.js
2023-02-24 21:27:55 -05:00

32 lines
586 B
JavaScript

const libCore = require("../libCore");
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', (req, res) => {
var sources = libCore.getSources();
//res.render('index', { "sources": sources });
var htmlOutput = "";
sources.forEach(source => {
htmlOutput += `
<div style='margin-bottom:15px;'>
<div> Title: ${source.title} </div>
<div> Link: ${source.link} </div>
<div> category: ${source.category} </div>
</div>
<div>
<hr />
</div>
`
});
res.send(htmlOutput);
});
module.exports = router;