forked from kriasoft/graphql-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ts
79 lines (75 loc) · 1.78 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
72
73
74
75
76
77
78
79
/* SPDX-FileCopyrightText: 2016-present Kriasoft <[email protected]> */
/* SPDX-License-Identifier: MIT */
/**
* Client-side application settings for the local development environment.
*/
const local = {
// Core application settings
app: {
name: "Example",
origin: "http://localhost:3000",
env: "local" as "local" | "test" | "prod",
},
// GraphQL API and OAuth endpoint(s)
api: {
origin: "http://localhost:8080",
prefix: "",
path: "/api",
},
// Firebase / Firestore (optional)
// https://firebase.google.com/docs/firestore
firebase: {
authKey: "xxxxx",
authDomain: "https://example-test.firebaseapp.com",
projectId: "example-test",
},
// Google Analytics
// https://developers.google.com/analytics/devguides/collection
gtag: {
trackingID: "G-XXXXXXXX",
anonymizeIP: true,
},
};
/**
* Client-side application settings for the test / QA environment.
*/
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",
},
gtag: local.gtag,
};
/**
* Client-side application settings for the production environment.
*/
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",
},
gtag: local.gtag,
};
export type Config = typeof local;
export { local, test, prod };
export default { local, test, prod };