Have a mostly working API server in go that's talking to streams/index.html and related pages.

This commit is contained in:
Zed A. Shaw 2025-05-31 14:12:08 -04:00
parent d49e1fbdc0
commit c576a61fbe
7 changed files with 168 additions and 21 deletions

View file

@ -9,7 +9,8 @@
<script defer src="/js/alpine.js"></script>
<script src="/js/code.js"></script>
<script>
let req = new GetJson("/api/stream/1/index.json");
let req = new GetJson("/api/stream/1");
let link_req = new GetJson("/api/stream/1/links");
</script>
</head>
@ -35,8 +36,8 @@
<block>
<h2>Links Posted</h2>
<ul>
<template x-for="item in Stream.links">
<ul x-init="links = await link_req.theData()" x-data="{links: {}}">
<template x-for="item in links">
<li><a x-text="item.description" x-bind:href="item.url"></a></li>
</template>
</ul>