-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathconfiguration.ts
More file actions
30 lines (21 loc) · 903 Bytes
/
configuration.ts
File metadata and controls
30 lines (21 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { parseCookie } from 'mobx-i18n';
export const isServer = () => typeof window === 'undefined';
export const Name = process.env.NEXT_PUBLIC_SITE_NAME,
Summary = process.env.NEXT_PUBLIC_SITE_SUMMARY,
DefaultImage = process.env.NEXT_PUBLIC_LOGO!;
export const { VERCEL, VERCEL_URL } = process.env;
export const API_Host = isServer()
? VERCEL_URL
? `https://${VERCEL_URL}`
: 'http://localhost:3000'
: globalThis.location.origin;
export const CACHE_HOST = process.env.NEXT_PUBLIC_CACHE_HOST!;
export const LARK_API_HOST = `${API_Host}/api/Lark/`;
export const ProxyBaseURL = 'https://bazaar.fcc-cd.dev/proxy';
export const GithubToken =
(globalThis.document && parseCookie().token) || process.env.GITHUB_TOKEN;
export const LarkAppMeta = {
host: process.env.NEXT_PUBLIC_LARK_API_HOST,
id: process.env.NEXT_PUBLIC_LARK_APP_ID!,
secret: process.env.LARK_APP_SECRET!,
};