From eeb5a4545417a81e87495bdf71a1e7854035e2ec Mon Sep 17 00:00:00 2001 From: John Facey Date: Tue, 14 Dec 2021 15:18:52 -0600 Subject: [PATCH] cant send multiple response --- index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index ec231f2..e0c0fa2 100644 --- a/index.js +++ b/index.js @@ -11,18 +11,19 @@ const server = express(); var libFlayer = require("./libFlayer.js"); server.all("/",(req, res) => { - res.send("Bot is Ready - Sources loading"); + var htmlOutput = `"Bot is Ready - Sources loading
"`; + var sources = libFlayer.getSources(); sources.forEach(source => { - res.send(` + htmlOutput +=`
Title: ${source.title}
Link: ${source.link}
-
- `); + ` }); + res.send(htmlOutput); });