Skip to content

Commit

Permalink
fix: 修复部署访问404的错误 (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
guobao2333 authored Nov 29, 2024
2 parents 6659e65 + ac70bd3 commit 3d9e9c0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/index.js → api/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import express from 'express';
import { post, get } from './server.js';
import { post, get } from '../src/server.js';

const app = express();

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
8 changes: 0 additions & 8 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"builds": [
{
"src": "package.json",
"use": "@vercel/node",
"config": { "zeroConfig": false }
}
],
"outputDirectory": "api",
"rewrites": [
{ "source": "/(.*)", "destination": "/api/index.js" }
]
Expand Down

0 comments on commit 3d9e9c0

Please sign in to comment.