Search

Results include substring matches and semantically similar vals. Learn more
vladimyr avatar
pekoExample
@vladimyr
An interactive, runnable TypeScript val by vladimyr
HTTP (deprecated)
import { denoServer } from "https://esm.town/v/pomdtr/deno_server?v=8";
const router = new Peko.Router();
router.get("/", () => new Response("Yes? Peko is also serving something at /hello"));
router.get("/hello", () => new Response("Hello world!"));
export default denoServer(router.handle, router);
xiyouMc avatar
foo
@xiyouMc
An interactive, runnable TypeScript val by xiyouMc
Script
import { test } from "https://esm.town/v/xiyouMc/test";
export const foo = test();
yieldray avatar
fav
@yieldray
An https://fav.farm alternative built on val.town Fork this val to host your own!
HTTP (deprecated)
An <https://fav.farm> alternative built on val.town
Fork this val to host your own!
if (import.meta.main) {
Deno.serve(fav);
export function fav(request: Request) {
const url = new URL(request.url);
if (url.pathname === "/")
return new Response(
String.raw`
<!DOCTYPE html>
politelyinvinciblepointer avatar
getinnerfeelingscounter
@politelyinvinciblepointer
An interactive, runnable TypeScript val by politelyinvinciblepointer
Script
import { innerfeelingscounter } from "https://esm.town/v/politelyinvinciblepointer/innerfeelingscounter";
export function getinnerfeelingscounter() {
return innerfeelingscounter;
tennox avatar
amethystPartridge
@tennox
An interactive, runnable TypeScript val by tennox
Script
const flag = "heurekaa";
console.log("plugin flag:", flag);
export { flag };
stevekrouse avatar
preact
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import { html } from "https://esm.town/v/stevekrouse/html";
import { render } from "npm:preact-render-to-string";
export let preact = jsx => html(render(jsx));
jessmartin avatar
browserlessScrapeExample
@jessmartin
An interactive, runnable TypeScript val by jessmartin
Script
export const browserlessScrapeExample = (async () => {
const res = await fetch(
`https://chrome.browserless.io/screenshot?token=${process.env.browserlessKey}`,
method: "POST",
body: JSON.stringify({
"url": "https://jessmartin-htmlHandler.express.val.run",
"options": {
"clip": {
"x": 0,
"y": 0,
ngmi avatar
spacex
@ngmi
SpaceX Launch tracker todo: fetch and persist data on regular basis display data from cache calendar endpoint
HTTP (deprecated)
SpaceX Launch tracker
todo:
- fetch and persist data on regular basis
- display data from cache
- calendar endpoint
/** @jsxImportSource npm:hono@3/jsx */
const app = new Hono()
export default app.fetch
const baseUrl = "https://moe-spacex.web.val.run"
const homeFrame = {
pomdtr avatar
blob_admin_edit
@pomdtr
@jsxImportSource https://esm.sh/hono@4.0.8/jsx
Script
/** @jsxImportSource https://esm.sh/hono@4.0.8/jsx **/
const route = new Hono();
route.get("/:name", async (c) => {
const name = c.req.param("name");
const resp = await blob.get(name);
const content = await resp.text();
return c.render(
<form method="POST">
<h1>
<input name="new_name" value={name} />
muhammad_owais_warsi avatar
shySapphireLeopard
@muhammad_owais_warsi
@jsxImportSource https://esm.sh/react
HTTP (deprecated)
/** @jsxImportSource https://esm.sh/react */
function App() {
const links = [
{ name: "Portfolio", url: "https://owais-warsi.vercel.app" },
{ name: "Twitter", url: "https://x.com/MO_warsi786" },
{ name: "GitHub", url: "https://github.com/Muhammad-Owais-Warsi" },
{ name: "LinkedIn", url: "https://www.linkedin.com/in/muhammad-owais-warsi-318987276/" },
{ name: "Blogs", url: "https://knowtech.hashnode.dev/" },
return (
<div className="container">
teamgroove avatar
sqliteExplorerApp
@teamgroove
SQLite Explorer View and interact with your Val Town SQLite data. It's based off Steve's excellent SQLite Admin val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by LibSQL Studio by invisal . This is now more an SPA, with tables, queries and results showing up on the same page. Install Install the latest stable version (v86) by forking this val: Authentication Login to your SQLite Explorer with password authentication with your Val Town API Token as the password. Todos / Plans [ ] improve error handling [ ] improve table formatting [ ] sticky table headers [x] add codemirror [ ] add loading indication to the run button (initial version shipped) [ ] add ability to favorite queries [ ] add saving of last query run for a table (started) [ ] add visible output for non-query statements [ ] add schema viewing [ ] add refresh to table list sidebar after CREATE/DROP/ALTER statements [ ] add automatic execution of initial select query on double click [x] add views to the sidebar [ ] add triggers to sidebar [ ] add upload from SQL, CSV and JSON [ ] add ability to connect to a non-val town Turso database [x] fix wonky sidebar separator height problem (thanks to @stevekrouse) [x] make result tables scrollable [x] add export to CSV, and JSON (CSV and JSON helper functions written in this val . Thanks to @pomdtr for merging the initial version!) [x] add listener for cmd+enter to submit query
HTTP (deprecated)
# SQLite Explorer
View and interact with your Val Town SQLite data. It's based off Steve's excellent [SQLite Admin](https://www.val.town/v/stev
![image.webp](https://imagedelivery.net/iHX6Ovru0O7AjmyT5yZRoA/c8e102fd-39ca-4bfb-372a-8d36daf43900/public)
## Install
Install the latest stable version (v86) by forking this val:
[![Install Stable Release (v86)](https://stevekrouse-button.express.val.run/Install%20Stable%20Release%20(v81))](https://www.
/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
EditorSection,
MockTable,
Separator,
janpaul123 avatar
reacttldrawclient
@janpaul123
tldraw example with builder, for consistent React versions.
Script
tldraw example with builder, for consistent React versions.
/** @jsxImportSource https://esm.sh/react@18.3.1 **/
const ret = await build({
dependencies: {
"react-dom": "18.3.1",
"react": "18.3.1",
"tldraw": "2.3.0",
source: `
export * as ReactDOM from "react-dom";
export * as React from "react";
janpaul123 avatar
valle_tmp_543915460990811923753769386621215
@janpaul123
// Initialize sample stories and store them in blob storage
HTTP (deprecated)
// Initialize sample stories and store them in blob storage
const SAMPLE_STORIES_KEY = "hn_realistic_sample_stories";
async function initializeSampleStories() {
const existingStories = await blob.getJSON(SAMPLE_STORIES_KEY);
if (!existingStories) {
const sampleStories = Array.from({ length: 30 }).map((_, idx) => ({
id: idx + 1,
title: faker.company.catchPhrase(),
url: faker.internet.url(),
votes: Math.floor(Math.random() * 100),
janpaul123 avatar
valle_tmp_26078469653238519037257020956977
@janpaul123
An interactive, runnable TypeScript val by janpaul123
HTTP (deprecated)
const SAMPLE_STORIES_KEY = "hn_realistic_sample_stories";
async function initializeSampleStories() {
const existingStories = await blob.getJSON(SAMPLE_STORIES_KEY);
if (!existingStories) {
const sampleStories = Array.from({ length: 30 }).map((_, idx) => ({
id: idx + 1,
title: faker.company.catchPhrase(),
url: faker.internet.url(),
votes: Math.floor(Math.random() * 100),
await blob.setJSON(SAMPLE_STORIES_KEY, sampleStories);
freyrva avatar
aqi
@freyrva
An interactive, runnable TypeScript val by freyrva
Script
export let aqi = async () => {
let pm25 = (
await fetchJSON(
"https://api.openaq.org/v2/latest?" +
new URLSearchParams({
limit: "10",
page: "1",
location: "San Francisco",
offset: "0",
sort: "desc",