diff --git a/public/index.html b/public/index.html index 80a76f3..0c791ff 100644 --- a/public/index.html +++ b/public/index.html @@ -59,6 +59,13 @@

This page is talking to its own backend

Everything below is served by the same instance, through /sdk.js. Open a second tab โ€” new entries appear in both without a refresh (that's the realtime layer).

+ + +

๐Ÿ’ฌ Guestbook data + live sync

@@ -108,7 +115,21 @@

Everything a generated app needs

diff --git a/test/api.test.ts b/test/api.test.ts index cd31f8e..d6812e1 100644 --- a/test/api.test.ts +++ b/test/api.test.ts @@ -85,6 +85,18 @@ test('serves the SDK and llms.txt', async () => { assert.equal(llms.status, 200); }); +test('serves the homepage demo, which is multi-tenant aware (accepts a ?key=)', async () => { + const res = await fetch(`${base}/`); + assert.equal(res.status, 200); + assert.match(res.headers.get('content-type') ?? '', /text\/html/); + const html = await res.text(); + // The demo lets you paste a project key (kept in sessionStorage) so it works on + // a multi-tenant server, and shows a notice explaining how. + assert.match(html, /key-form/); + assert.match(html, /sessionStorage/); + assert.match(html, /mt-notice/); +}); + test('serves the examples gallery and apps', async () => { for (const p of ['/examples.html', '/examples/todo.html', '/examples/chat.html', '/examples/notes.html']) { const res = await fetch(`${base}${p}`);