使用环境变量

This commit is contained in:
2025-05-08 16:02:34 +08:00
parent eb9cda14ff
commit 33b6e242c3
7 changed files with 545 additions and 438 deletions

View File

@@ -24,8 +24,8 @@ function decode(bytes?: string) {
)
}
const judge = axios.create({ baseURL: `https://judge0api.xuyue.cc` })
const api = axios.create({ baseURL: `https://codeapi.xuyue.cc` })
const judge = axios.create({ baseURL: import.meta.env.PUBLIC_JUDGE0API_URL })
const api = axios.create({ baseURL: import.meta.env.PUBLIC_CODEAPI_URL })
export async function submit(code: Code, input: string) {
const encodedCode = encode(code.value)