Implement Discord CnC Server into Emmelia

This commit is contained in:
Logan Cusano
2023-02-24 21:27:55 -05:00
parent 0ee5c4293f
commit 24b16d87ea
19 changed files with 926 additions and 135 deletions

31
routes/index.js Normal file
View File

@@ -0,0 +1,31 @@
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;