Files
gitlab-instance-0a899031_di…/app/lib/env.ts
2026-03-08 03:40:53 -05:00

20 lines
594 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 环境配置:区分本地调试与生产部署
* 生产https://api.hackrobot.cnpayjsapi
*/
const isDev = process.env.NODE_ENV === "development";
/** 支付 API 地址payjsapi */
export const PAYMENT_API_URL =
process.env.PAYMENT_API_URL ||
(isDev ? "http://127.0.0.1:8700" : "https://api.hackrobot.cn");
/** 站点根地址(用于 return_url 等回跳,生产需配置) */
export const SITE_URL =
process.env.NEXT_PUBLIC_SITE_URL ||
(isDev ? "http://localhost:3001" : "https://hackrobot.cn");
/** 是否为本地开发 */
export const IS_DEV = isDev;