Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Started > Val Town #159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const sidebars = {
{ text: 'Bun', link: '/getting-started/bun' },
{ text: 'Fastly Compute', link: '/getting-started/fastly' },
{ text: 'Lagon', link: '/getting-started/lagon' },
{ text: 'Val Town', link: '/getting-started/val-town' },
{ text: 'Vercel', link: '/getting-started/vercel' },
{ text: 'Netlify', link: '/getting-started/netlify' },
{ text: 'AWS Lambda', link: '/getting-started/aws-lambda' },
Expand Down Expand Up @@ -120,7 +121,7 @@ export default defineConfig({
lang: 'en-US',
title: 'Hono',
description:
'Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Lagon, Node.js, and others. Fast, but not only fast.',
'Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Val Town, Lagon, Node.js, and others. Fast, but not only fast.',
lastUpdated: true,
ignoreDeadLinks: true,
cleanUrls: 'with-subfolders',
Expand Down
1 change: 1 addition & 0 deletions concepts/web-standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ In addition, we have a Node.js adapter. Hono runs on these runtimes:
- AWS Lambda
- Node.js
- Vercel (edge-light)
- Val Town

It also works on Netlify and other platforms.
The same code runs on all platforms.
Expand Down
25 changes: 25 additions & 0 deletions getting-started/val-town.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Val Town

Val Town is a social website to write and deploy functions – JavaScript, TypeScript, and JSX – entirely from the browser.

Val Town APIs are based on the [fetch handler standard](https://blog.val.town/blog/the-api-we-forgot-to-name), so it's extremely well suited for Hono. Hono is one of the [most-used](https://www.val.town/examples/packages/hono) packages on Val Town.

## 1. Hello World

<iframe src="https://www.val.town/embed/stevekrouse/honoExample" frameborder=0 width="100%" height="420px"></iframe>

## 2. JSX

Hono JSX works with this TypeScript pragma

```ts
/** @jsxImportSource https://esm.sh/[email protected]/jsx **/
```

Live example:

<iframe src="https://www.val.town/embed/stevekrouse/honoJSX" frameborder=0 width="100%" height="920px"></iframe>

## 3. Browse Examples

Val Town is a community to share ideas and build on each other's inspiration. You can browse [usage of the hono npm package on Val Town](https://www.val.town/examples/packages/hono) or [search for more examples](https://www.val.town/search?q=hono).
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ head:
'meta',
{
property: 'og:description',
content: 'Hono is a small, simple, and ultrafast web framework for the Edges. It works on Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Netlify, Lagon, AWS Lambda, Lambda@Edge, and Node.js. Fast, but not only fast.',
content: 'Hono is a small, simple, and ultrafast web framework for the Edges. It works on Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Val Town, Netlify, Lagon, AWS Lambda, Lambda@Edge, and Node.js. Fast, but not only fast.',
},
]
layout: home
Expand Down
1 change: 1 addition & 0 deletions top.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ Thanks to the use of the **Web Standard API**, Hono works on a lot of platforms.
- Deno
- Bun
- Lagon
- Val Town
- Vercel
- AWS Lambda
- Lambda@Edge
Expand Down