Skip to content

Commit

Permalink
doc: 添加vercel一键部署按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Aug 28, 2024
1 parent b0a3475 commit 0563da4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions doc/cn/VERCEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

`/src/adapter/vercel`中提供了示例代码,可以完成Vercel部署,和基础的功能测试。但是无法保证所有功能都能正常工作。

### 自动部署

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FTBXark%2FChatGPT-Telegram-Workers&env=UPSTASH_REDIS_REST_URL,UPSTASH_REDIS_REST_TOKEN,VERCEL_DOMAIN,TELEGRAM_AVAILABLE_TOKENS&project-name=chatgpt-telegram-workers&repository-name=ChatGPT-Telegram-Workers&demo-title=ChatGPT-Telegram-Workers&demo-description=Deploy%20your%20own%20Telegram%20ChatGPT%20bot%20on%20Cloudflare%20Workers%20with%20ease.&demo-url=https%3A%2F%2Fchatgpt-telegram-workers.vercel.app)


### 手动部署

```shell
yarn global add vercel # 安装vercel命令行工具
yarn # 安装依赖
Expand All @@ -11,4 +18,5 @@ yarn run deploy:vercel # 部署到vercel
```

### 已知问题

1. redis 连接关闭有问题会导致客户端连接数过多导致无法连接建议使用upstash的redis服务
9 changes: 9 additions & 0 deletions doc/en/VERCEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

The `/src/adapter/vercel` provides sample code that can complete Vercel deployment and basic functional testing. However, it cannot guarantee that all functions will work properly.


### Automatic deployment

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FTBXark%2FChatGPT-Telegram-Workers&env=UPSTASH_REDIS_REST_URL,UPSTASH_REDIS_REST_TOKEN,VERCEL_DOMAIN,TELEGRAM_AVAILABLE_TOKENS&project-name=chatgpt-telegram-workers&repository-name=ChatGPT-Telegram-Workers&demo-title=ChatGPT-Telegram-Workers&demo-description=Deploy%20your%20own%20Telegram%20ChatGPT%20bot%20on%20Cloudflare%20Workers%20with%20ease.&demo-url=https%3A%2F%2Fchatgpt-telegram-workers.vercel.app)


### Manual deployment

```shell
yarn global add vercel # Install the Vercel command-line tool.
yarn # Install dependencies.
Expand All @@ -11,4 +19,5 @@ yarn run deploy:vercel # Deploy to Vercel.
```

### Known issue.

1. There is a problem with closing Redis connections, which can cause too many client connections and make it impossible to connect. It is recommended to use Upstash's Redis service.
1 change: 0 additions & 1 deletion src/adapter/vercel/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ENV } from '../../config/env';
import { createRouter } from '../../route';

export default async function (request: VercelRequest, response: VercelResponse) {
const redis: UpStashRedis | null = null;
try {
const {
UPSTASH_REDIS_REST_URL,
Expand Down

0 comments on commit 0563da4

Please sign in to comment.