Avatar

tmcw

👷 Building Val Town
Joined August 31, 2022
Public vals
167
tmcw avatar
tmcw
ascii85example
Script
ascii85 Or Base85 - this is similar to the other z85 example, it just uses different character mappings.
0
tmcw avatar
tmcw
z85example
Script
z85 example The z85 encoding is similar to the Ascii85 encoding. They're both ways to encode binary data as strings, but with different limitations and strengths. Base64 is a more common way to encode strings, but z85 and Ascii85 use more characters and can thus be a little more efficient - but at the cost of including characters that might be dangerous to use in some contexts. For example, Ascii85 includes the \ character, which is used for character escapes in many contexts.
0
tmcw avatar
tmcw
octokitGraphQLExample
Script
octokit/graphql This alternative driver for the GitHub API exposes it via GraphQL.
0
tmcw avatar
tmcw
hostedGitInfoExample
Script
hosted-git-info This neat npm module lets you parse a Git URL from GitHub or elsewhere.
0
tmcw avatar
tmcw
urlQueryStringExample
HTTP
This example shows how to get the query parameters out of a request with the Web API. Check out the searchParams object for more ways to handle query parameters.
0
tmcw avatar
tmcw
ittyRouterExample
HTTP
itty-router This is an example of using the Val Town Web API to integrate with itty-router . Server examples Hono Peko Itty Router Nhttp
0
tmcw avatar
tmcw
nhttpExample
HTTP
nhttp example This uses the tiny nhttp framework with the Val Town Web API . New frameworks like nhttp works really well with our system because they rely on the standard Request & Response objects! Server examples Hono Peko Itty Router Nhttp
0
tmcw avatar
tmcw
pekoExample
HTTP
peko This is an example of using the tiny peko example with Val Town - it's a small router that lets you build web apps using the standard Request & Response objects. Peko just provides routing - matching URLs with functions - and lets you create your own Response object. Server examples Hono Peko Itty Router Nhttp
0
tmcw avatar
tmcw
honoExample
HTTP
Hono Here's an example using the Hono server library with the Web API . It works great! Server examples Hono Peko Itty Router Nhttp
0
tmcw avatar
tmcw
headersExample
HTTP
An interactive, runnable TypeScript val by tmcw
0
tmcw avatar
tmcw
htmlExample
HTTP
Returning HTML from the Val Town Web API This just lets you use the standard Response object with our Web API to return an HTML response from this Val.
0
tmcw avatar
tmcw
jsonOkExample
HTTP
Response.json Example This val produces the JSON { ok: true } at the URL: https://tmcw-jsonokexample.web.val.run/
0
tmcw avatar
tmcw
sendFiveHundred
Script
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
0
tmcw avatar
tmcw
zodUnserializable
Script
An interactive, runnable TypeScript val by tmcw
0
tmcw avatar
tmcw
gifEndpoint
Express (deprecated)
Returning a tiny GIF from a val Here's that GIF: It's so small!
0
tmcw avatar
tmcw
sqliteExample
Script
sqlite This uses a Deno+WASM+SQLite approach. Using SQLite ! Running SQLite in memory works great, and the SQLite module just uses WebAssembly so it works within the Val Town permissions model.
0