Initial Emmelia merge
This commit is contained in:
@@ -1,9 +1,31 @@
|
||||
const libCore = require("../libCore");
|
||||
var express = require('express');
|
||||
var router = express.Router();
|
||||
|
||||
/* GET home page. */
|
||||
router.get('/', (req, res, next) => {
|
||||
res.render('index', { title: 'Express' });
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user