Skip to content

Commit

Permalink
feat: 添加 vercel 支持
Browse files Browse the repository at this point in the history
  • Loading branch information
kilingzhang committed Dec 25, 2023
1 parent 146a4ee commit b10138e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions .vercelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

## log

- 2023-12-26
- 添加 vercel 支持
- 更新全部已有接口 修复失效接口 (距离上次更新竟然又已经三年了 - -)
- 2020-04-20 更新全部已有接口 修复失效接口 (距离上次更新竟然已经三年了 - -)
- 2017-08-21 nodejs版接口基本完成php的转换

Expand Down
3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
"authors": [
{
"name": "kilingzhang",
"email": "i@kilingzhang.com",
"homepage": "https://blog.kilingzhang.com",
"role": "Developer"
}
],
Expand Down Expand Up @@ -43,6 +41,5 @@
],
"license": "MIT",
"require-dev": {
"phpunit/phpunit": "^8.5"
}
}
1 change: 0 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/
require_once "vendor/autoload.php";
ini_set('date.timezone', 'Asia/Chongqing');

!defined('PATH_INFO') && define('PATH_INFO', trim(parse_url($_SERVER['REQUEST_URI'])['path'], '/'));

$namespaces = explode('/', PATH_INFO);
Expand Down
13 changes: 13 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"routes": [
{
"src": "/(.*)",
"dest": "/index.php?$1"
}
],
"functions": {
"index.php": {
"runtime": "vercel-php@0.3.3"
}
}
}

0 comments on commit b10138e

Please sign in to comment.