Vals using hono
Description from the NPM package:
Web framework built on Web Standards
maxm
multiplayerCircles
Multiplayer Circles Move circles around. State is synced with the server. Open a window in another tab and watch the circles update as you move them .
HTTP

pomdtr
lastloginHono
See @pomdtr/lastlogin for more informations about the middleware Example /** @jsxImportSource npm:hono@3/jsx */
import { lastlogin } from "https://esm.town/v/pomdtr/lastloginHono";
import { verifyUserEmail } from "https://esm.town/v/pomdtr/verifyUserEmail"
import { Hono } from "npm:hono";
const app = new Hono();
const lastloginMiddleware = lastlogin({
verifyEmail: verifyUserEmail
});
// required for the auth pages to work
app.use("/auth/*", lastloginMiddleware);
// this page is public
app.get("/", async (c) => {
return c.html(
<div>
There is a secret message for you if you{" "}<a href="/secret">login</a>
</div>,
);
});
// this page requires the user to signup
app.get("/secret", lastloginMiddleware, async (c) => {
const email = c.req.header("X-User-Email");
return c.html(
<div>
I think {email} is a really silly email address, actually.
</div>,
);
});
export default app.fetch;
Script
tyler71
outdoorFairWeather
Upstream /kingishb/blackLobster Why this one? Takes in a query string of lat, lon and timezone, returns a list of good biking days as an API response. Query Params: lat lon tz Example query: ?lat=47.606209&lon=-122.332069&tz=America/Los_Angeles Example response: {
"status": "success",
"message": "Retrieved Times",
"data": {
"biking": [
{
"start": "Wed 11:00 AM",
"end": "Wed 6:00 PM"
},
{
"start": "Thu 10:00 AM",
"end": "Thu 6:00 PM"
},
{
"start": "Fri 9:00 AM",
"end": "Fri 6:00 PM"
},
{
"start": "Sat 8:00 AM",
"end": "Sat 6:00 PM"
},
{
"start": "Sun 9:00 AM",
"end": "Sun 6:00 PM"
},
{
"start": "Mon 10:00 AM",
"end": "Mon 6:00 PM"
}
]
}
}
HTTP

pomdtr
freeformServer
Freeform Brings a taste of Observable to Val Town. This val was adapted from @tmcw obsidian plugin . Instead of using the display function, this port use export default . https://pomdtr-freeformServer.web.val.run/v/<author>/<name> or https://freeform.pomdtr.me/v/<author>/<name> Examples Bar Chart ( View Source )
HTTP

yawnxyz
semanticSearch
In-memory semantic search; load it up with valtown KV. This is a "dumb" version of vector search, for prototyping RAG responses and UIs — with both regular search (w/ Lunr) and vector search (with OpenAI embeddings + cosine similarity) Usage: import { semanticSearch } from "https://esm.town/v/yawnxyz/semanticSearch";
const documents = [
{ id: 1, content: 'cats dogs' },
{ id: 2, content: 'elephants giraffes lions tigers' },
{ id: 3, content: 'edam camembert cheddar' }
];
async function runExample() {
// Add documents to the semantic search instance
await semanticSearch.addDocuments(documents);
const results = await semanticSearch.search('animals', 0, 3);
console.log('Top 3 search results for "animals":');
console.log(results);
}
runExample();
Script