-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.js
78 lines (67 loc) · 2.05 KB
/
config.js
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
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
/* eslint-disable max-len */
if (process.env.BROWSER) {
throw new Error(
'Do not import `config.js` from inside the client-side code.',
);
}
module.exports = {
// Node.js app
port: process.env.PORT || 3000,
// https://expressjs.com/en/guide/behind-proxies.html
trustProxy: process.env.TRUST_PROXY || 'loopback',
// API Gateway
api: {
// API URL to be used in the client-side code
clientUrl: process.env.API_CLIENT_URL || '',
// API URL to be used in the server-side code
serverUrl:
process.env.API_SERVER_URL ||
`http://localhost:${process.env.PORT || 3000}`,
},
// Database
databaseUrl: process.env.DATABASE_URL || 'sqlite:database.sqlite',
// Web analytics
analytics: {
// https://analytics.google.com/
googleTrackingId: process.env.GOOGLE_TRACKING_ID, // UA-XXXXX-X
},
// Authentication
auth: {
jwt: { secret: process.env.JWT_SECRET || 'React Starter Kit' },
// https://developers.facebook.com/
facebook: {
id: process.env.FACEBOOK_APP_ID || '186244551745631',
secret:
process.env.FACEBOOK_APP_SECRET || 'a970ae3240ab4b9b8aae0f9f0661c6fc',
},
// https://cloud.google.com/console/project
google: {
id:
process.env.GOOGLE_CLIENT_ID ||
'251410730550-ahcg0ou5mgfhl8hlui1urru7jn5s12km.apps.googleusercontent.com',
secret: process.env.GOOGLE_CLIENT_SECRET || 'Y8yR9yZAhm9jQ8FKAL8QIEcd',
},
// https://apps.twitter.com/
twitter: {
key: process.env.TWITTER_CONSUMER_KEY || 'Ie20AZvLJI2lQD5Dsgxgjauns',
secret:
process.env.TWITTER_CONSUMER_SECRET ||
'KTZ6cxoKnEakQCeSpZlaUCJWGAlTEBJj0y2EMkUBujA7zWSvaQ',
},
},
// logging of log4js
logging: {
filename: 'app.log',
level: 'debug',
backups: 10,
maxLogSize: 10485760,
},
};