generated from kriasoft/react-starter-kit
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ts
71 lines (67 loc) · 1.69 KB
/
config.ts
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* SPDX-FileCopyrightText: 2014-present Kriasoft <[email protected]> */
/* SPDX-License-Identifier: MIT */
/**
* Client-side application settings for the local development environment.
*/
export const local = {
// Core application settings
app: {
name: "React App",
origin: "http://localhost:3000",
env: "local" as "local" | "test" | "prod",
},
// GraphQL API and OAuth endpoint(s)
// https:/kriasoft/node-starter-kit
api: {
origin: "https://us-central1-kriasoft.cloudfunctions.net",
prefix: "/reactstarter", // Cloud Function URL pathname
path: "/api",
},
// Firebase / Firestore (optional)
// https://firebase.google.com/docs/firestore
firebase: {
authKey: "xxxxx",
authDomain: "https://example.firebaseapp.com",
projectId: "example",
},
};
/**
* Client-side application settings for the test / QA environment.
*/
export const test: typeof local = {
app: {
...local.app,
origin: "https://test.example.com",
env: "test",
},
api: {
...local.api,
origin: "https://us-central1.example-test.cloudfunctions.net",
},
firebase: {
authKey: "xxxxx",
authDomain: "https://example-test.firebaseapp.com",
projectId: "example-test",
},
};
/**
* Client-side application settings for the production environment.
*/
export const prod: typeof local = {
app: {
...local.app,
origin: "https://example.com",
env: "prod",
},
api: {
...local.api,
origin: "https://us-central1.example.cloudfunctions.net",
},
firebase: {
authKey: "xxxxx",
authDomain: "https://example.firebaseapp.com",
projectId: "example",
},
};
export type Config = typeof local;
export default { local, test, prod };