From 29eb0121199f9d16bf7687a7e62502a3a6a73801 Mon Sep 17 00:00:00 2001 From: guobao2333 Date: Fri, 29 Nov 2024 08:08:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=E4=BF=AE=E5=A4=8D=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E8=AE=BF=E9=97=AE404=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {src => api}/index.js | 2 +- package.json | 3 +-- vercel.json | 8 -------- 3 files changed, 2 insertions(+), 11 deletions(-) rename {src => api}/index.js (87%) diff --git a/src/index.js b/api/index.js similarity index 87% rename from src/index.js rename to api/index.js index ab71388..e55789a 100644 --- a/src/index.js +++ b/api/index.js @@ -1,5 +1,5 @@ import express from 'express'; -import { post, get } from './server.js'; +import { post, get } from './src/server.js'; const app = express(); diff --git a/package.json b/package.json index 1835fd0..6e15f7c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "deeplx-serverless", - "version": "3.0.0", + "version": "3.0.1", "description": "DeepL free API for Serverless", "type": "module", "main": "server.js", @@ -17,7 +17,6 @@ "node": ">=18" }, "scripts": { - "build:vercel": "mv src/* api/", "start": "node src/server.js", "test": "node test.js", "start:sl": "node src/index.js", diff --git a/vercel.json b/vercel.json index d5f71b3..d828cc4 100644 --- a/vercel.json +++ b/vercel.json @@ -1,12 +1,4 @@ { - "builds": [ - { - "src": "package.json", - "use": "@vercel/node", - "config": { "zeroConfig": false } - } - ], - "outputDirectory": "api", "rewrites": [ { "source": "/(.*)", "destination": "/api/index.js" } ] From ac70bd3afbdc1ce80c33aa2e218daa9db752a155 Mon Sep 17 00:00:00 2001 From: guobao2333 Date: Fri, 29 Nov 2024 08:10:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E4=BF=AE=E5=A4=8D=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E8=AE=BF=E9=97=AE404=E9=94=99=E8=AF=AF=20+1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/index.js b/api/index.js index e55789a..4ffa8e0 100644 --- a/api/index.js +++ b/api/index.js @@ -1,5 +1,5 @@ import express from 'express'; -import { post, get } from './src/server.js'; +import { post, get } from '../src/server.js'; const app = express();