Implement Discord CnC Server into Emmelia
This commit is contained in:
31
routes/index.js
Normal file
31
routes/index.js
Normal 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;
|
||||
Reference in New Issue
Block a user