Search

Results include substring matches and semantically similar vals. Learn more
webup avatar
chat
@webup
An interactive, runnable TypeScript val by webup
Script
export const chat = async (
prompt: string | object = "Hello world",
options = {},
// Initialize OpenAI API stub
const { Configuration, OpenAIApi } = await import(
"https://esm.sh/openai@3.3.0"
const configuration = new Configuration({
apiKey: process.env.OPENAI,
const openai = new OpenAIApi(configuration);
// Request chat completion
yawnxyz avatar
ragwithclaude_ui
@yawnxyz
Wanted to build a UI for Simon's thing but he locked it lol
HTTP (deprecated)
Wanted to build a UI for Simon's thing but he locked it lol
/** @jsx jsx **/
// rag with claude ui
// https://simonw-ragwithclaude.web.val.run/?question=what%20is%20shot%20scraper
const app = new Hono();
const Page = () => (
<html lang="en">
<head>
<title>Simple HTMX Example</title>
<script src="https://unpkg.com/htmx.org@1.9.9"></script>
pomdtr avatar
indie_auth
@pomdtr
@jsxImportSource npm:preact
Script
/** @jsxImportSource npm:preact **/
type HandlerFunc = (req?: Request) => Response | Promise<Response>;
export function indieauth(handler: HandlerFunc, params: {
clientID: string;
}): HandlerFunc {
return (req) => {
return html(render(
<form action="https://indielogin.com/auth" method="get">
<label for="url">Web Address:</label>
<input id="url" type="text" name="me" placeholder="yourdomain.com" />
vladimyr avatar
honoExample
@vladimyr
An interactive, runnable TypeScript val by vladimyr
HTTP (deprecated)
import { denoServer } from "https://esm.town/v/pomdtr/deno_server?v=8";
const app = new Hono();
app.get("/", (c) => c.text("Hello from Hono!"));
app.get("/yeah", (c) => c.text("Routing!"));
export default denoServer(app.fetch);
yawnxyz avatar
blobbyFace
@yawnxyz
(todo) This lists all your blobs. You can create new blobs, edit them, or even preview (and upload) file blobs from both URL and computer!
HTTP (deprecated)
(todo)
This lists all your blobs. You can create new blobs, edit them, or even preview (and upload) file blobs from both URL and com
// import { MagikaNode as Magika } from "npm:magika"; // doesn't yet work :(
const app = new Hono();
app.use('*', cors({
origin: '*',
allowMethods: ['GET', 'POST'],
allowHeaders: ['Content-Type'],
const DOWNLOAD_URL = "https://yawnxyz-serve.web.val.run"; // https://yawnxyz-serve.web.val.run/myImage.jpg
// Define an array of JSON objects
yusukebe avatar
moccasinMoose
@yusukebe
An interactive, runnable TypeScript val by yusukebe
HTTP (deprecated)
import { Hono } from "npm:hono@4";
const app = new Hono();
app.get("/", (c) => c.text("Hello Val!"));
export default app.fetch;
tmcw avatar
pinkGalliform
@tmcw
Something
HTTP (deprecated)
Something
/** @jsxImportSource npm:hono@3/jsx */
const app = new Hono()
app.get("/", async (c) => {
const response = await fetch("https://hacker-news.firebaseio.com/v0/topstories.json")
const storyIds = await response.json()
const storyResponse = await fetch(`https://hacker-news.firebaseio.com/v0/item/${storyIds[0]}.json`)
const story = await storyResponse.json()
return c.html(
<div>
nbbaier avatar
honoJSX
@nbbaier
@jsxImportSource https://esm.sh/hono@3.9.2/jsx
HTTP (deprecated)
/** @jsxImportSource https://esm.sh/hono@3.9.2/jsx **/
const Layout: FC = (props) => {
return (
<html>
<head>
<style>
.container {
container-type: inline-size;
main {
padding: 1rem;
peterqliu avatar
vt_app
@peterqliu
@jsxImportSource https://esm.sh/hono@4.0.8/jsx
HTTP (deprecated)
/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
const app = new Hono();
app.use(
jsxRenderer(({ children }) => {
return (
<html>
<head>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
impedivity avatar
tanaSave
@impedivity
// console.log(console.log(JSON.stringify(Request)));
HTTP (deprecated)
const token = Deno.env.get("tanaInputAPI");
console.log(token);
console.log(Request);
// console.log(console.log(JSON.stringify(Request)));
export const tanaSave = async (req: Request) => {
// console.log("Hello, World!");
const app = new Hono();
app.get("/", async c => c.text("Hello from Hono!"));
app.get("/save", async c => c.text("Endpoint: /save"));
app.get("/save2", async c => {
stevekrouse avatar
favFarm
@stevekrouse
Clone of fav.farm by @wesbos A little favicon service
HTTP (deprecated)
# Clone of [fav.farm](https://fav.farm/) by @wesbos
A little favicon service
/** @jsxImportSource npm:hono@3/jsx */
const app = new Hono();
app.get("/", (c) => {
return c.html(
<html lang="en">
<head>
<title>fav.farm</title>
<link rel="icon" href="/🚜" />
feb avatar
simplifyHTML
@feb
An interactive, runnable TypeScript val by feb
Script
export const simplifyHTML = async (params) => {
const { DOMParser } = await import(
"https://deno.land/x/deno_dom/deno-dom-wasm.ts"
const { Readability } = await import("npm:@mozilla/readability");
const doc = new DOMParser().parseFromString(params.html, "text/html");
const reader = new Readability(doc);
return reader.parse();
pomdtr avatar
smallwebDashboard
@pomdtr
smallweb.json { "permissions": { "env": true, "read": true, "run": [ "smallweb" ] } } .env EMAIL=<your-email>
Script
## smallweb.json
```json
"permissions": {
"env": true,
"read": true,
"run": [
/** @jsxImportSource jsr:@hono/hono@4.4.8/jsx */
const auth = lastlogin({
verifyEmail: (email) => email === Deno.env.get("EMAIL"),
const app = new Hono();
yawnxyz avatar
openAIHonoChatStreamExample
@yawnxyz
Example of using Hono to stream OpenAI's streamed chat responses!
HTTP (deprecated)
Example of using Hono to stream OpenAI's streamed chat responses!
const app = new Hono();
const openai = new OpenAI();
app.use('*', cors({
origin: '*',
allowMethods: ['GET'],
allowHeaders: ['Content-Type'],
// Set CORS and headers for SSE
app.use('/chat, /chat/*', async (c, next) => {
c.header('Content-Type', 'text/event-stream');
pomdtr avatar
tinybase_example_server
@pomdtr
@jsxImportSource npm:hono/jsx
HTTP (deprecated)
/** @jsxImportSource npm:hono/jsx */
const app = new Hono();
const blobKey = `tinybase_example.json`;
app.get("/", (c) => {
// The client script is referenced in the page head
return c.html(
<html>
<head>
<title>Tinybase Example</title>
<link rel="stylesheet" href="https://unpkg.com/missing.css@1.1.1" />
…
10
…
Next