Skip to content

Commit 852fa5f

Browse files
committed
chore: minor change
1 parent 8f384d9 commit 852fa5f

File tree

5 files changed

+3
-7
lines changed

5 files changed

+3
-7
lines changed

astro.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import {
1212
import solidJs from "@astrojs/solid-js"
1313

1414
const adapter = () => {
15-
if (process.env.SERVER == "vercel") {
15+
if (process.env.VERCEL) {
1616
return vercel()
17-
} else if (process.env.SERVER == "netlify") {
17+
} else if (process.env.NETLIFY) {
1818
return netlify()
1919
} else {
2020
return node({

netlify.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
NODE_VERSION = "18"
44

55
[build]
6-
command = "pnpm build:netlify"
76
publish = "dist"

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
"scripts": {
88
"dev": "astro dev",
99
"build": "astro build",
10-
"build:vercel": "SERVER=vercel astro build",
11-
"build:netlify": "SERVER=netlify astro build",
1210
"start": "node ./dist/server/entry.mjs",
1311
"preview": "astro preview",
1412
"astro": "astro",

src/pages/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const localKey =
99
import.meta.env.OPENAI_API_KEY || process.env.OPENAI_API_KEY || ""
1010

1111
export const baseURL =
12-
process.env.VERCEL || process.env.NOGFW
12+
process.env.VERCEL || process.env.NETLIFY || process.env.NOGFW
1313
? "api.openai.com"
1414
: (
1515
import.meta.env.OPENAI_API_BASE_URL ||

vercel.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"buildCommand": "pnpm build:vercel",
32
"crons": [
43
{
54
"path": "/api/cron",

0 commit comments

Comments
 (0)