-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 变化:添加手动运行构建 * 更新:优化文档和错误修正 * 变化:调整构建action * 更新:新增netlify支持
- Loading branch information
1 parent
bd23c4d
commit 63056ca
Showing
5 changed files
with
51 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import express from 'express'; | ||
import fetch from 'node-fetch'; | ||
import { post, get } from '../server.js'; | ||
|
||
const app = express(); | ||
|
||
app.post('/translate', async (req, res) => { | ||
// 转发请求 | ||
const response = await post(req, res); | ||
|
||
// 返回响应 | ||
const data = await response.json(); | ||
res.status(response.status).json(data); | ||
}); | ||
|
||
app.get('/', async (req, res) => await get(req, res)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters