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

Add documentation for deploying Hono apps to endpts #112

Closed
wants to merge 1 commit into from
Closed
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
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)
- endpts

It also works on Netlify and other platforms.
The same code runs on all platforms.
Expand Down
1 change: 1 addition & 0 deletions getting-started/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Let's select Cloudflare Workers for this example.
nextjs
nodejs
vercel
endpts
```

The template will be pulled into `my-app`, so go to it and install the dependencies.
Expand Down
58 changes: 58 additions & 0 deletions getting-started/endpts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# endpts

[endpts](https://endpts.io/) is a platform to seamlessly build and deploy APIs powered by Node.js serverless functions. The endpts development environment supports TypeScript out of the box, hot reloading, and bundling.

You can run your Hono application with access to the entire NPM ecosystem and Node.js APIs.

## 1. Setup

A starter template for endpts is available. Start your project with "create-hono" command:

```
npm create hono@latest my-app
```

Move to `my-app` and install the dependencies:

```
cd my-app
npm i
```

## 2. Hello World

The `routes/index.ts` contains a simple Hono application:

```ts
// routes/index.ts
import { Hono } from 'hono'
const app = new Hono()

app.get('/', (c) => c.text('Hello Hono!'))

export default {
handler: app.fetch,
}
```

endpts Functions use Web Standard APIs making them compatible with Hono by assigning `app.fetch` to the `handler`.

The `routes/` directory is a special directory that endpts automatically scans to register your applications routes. You can read more about the project structure in the [endpts Documentation](https://endpts.io/docs/core-concepts/serverless-functions).

## 3. Run

Run the command.

```ts
npm run dev
```

Then, visit `http://localhost:3000` in your browser or use curl:

```shell
curl http://localhost:3000
```

## 4. Deploy

You can deploy your application to endpts via the [endpts Dashboard](https://dashboard.endpts.io/). You can connect your GitHub account to automatically deploy your application on every push.
5 changes: 3 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ 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@Edge, 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@Edge, Deno, Bun, Vercel, Netlify, Lagon, endpts, AWS Lambda, Lambda@Edge, and Node.js. Fast, but not only fast.',
},
]
---

# Hono

Hono - _**\[炎\] means flame🔥 in Japanese**_ - is a small, simple, and ultrafast web framework for the Edges.
It works on any JavaScript runtime: Cloudflare Workers, Fastly Compute@Edge, Deno, Bun, Vercel, Netlify, Lagon, AWS Lambda, Lambda@Edge, and Node.js.
It works on any JavaScript runtime: Cloudflare Workers, Fastly Compute@Edge, Deno, Bun, Vercel, Netlify, Lagon, endpts, AWS Lambda, Lambda@Edge, and Node.js.

Fast, but not only fast.

Expand Down Expand Up @@ -127,6 +127,7 @@ Thanks to the use of the **Web Standard API**, Hono works on a lot of platforms.
- Bun
- Lagon
- Vercel
- endpts
- AWS Lambda
- Lambda@Edge
- Others
Expand Down