1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
export const CLIBlog = (async () => {
// let response = await fetch(
// "https://example-files.online-convert.com/document/txt/example.txt",
// );
// if (response.status != 200) {
// throw new Error("Server Error");
// }
// // read response stream as text
// let text_data = await response.text();
// let lines = text_data.split("\n");
// return lines;
let entries = [
{ text: "cool note" },
{ text: "another cool note" },
{ text: "yet another cool note" },
];
let text = "";
for (let ele of entries) {
text += "\n <div class=entry> " + ele.text + "</div>";
}
return `<html>
<body> ${text}
</body>
</html>`;
})();