generated from kriasoft/graphql-starter-kit
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.ts
55 lines (44 loc) · 1.35 KB
/
env.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
/* SPDX-FileCopyrightText: 2016-present Kriasoft <[email protected]> */
/* SPDX-License-Identifier: MIT */
import { bool, cleanEnv, json, num, str, url } from "envalid";
/**
* Ensures that all of the environment dependencies are met.
*
* @see https://github.com/af/envalid
*/
export default cleanEnv(process.env, {
GOOGLE_CLOUD_PROJECT: str(),
GOOGLE_CLOUD_REGION: str(),
APP_NAME: str(),
APP_ORIGIN: url(),
APP_ENV: str({ choices: ["prod", "test", "local"] }),
VERSION: str(),
PUBLIC_KEY: json(),
PRIVATE_KEY: json(),
SESSION_EXPIRES: num({ default: 60 * 60 * 24 * 30 /* 30 days */ }),
PGHOST: str(),
PGPORT: num({ default: 5432 }),
PGUSER: str(),
PGPASSWORD: str(),
PGDATABASE: str(),
PGSSLMODE: str({ choices: ["disable", "verify-ca"], default: "disable" }),
PGSSLCERT: str({ default: "" }),
PGSSLKEY: str({ default: "" }),
PGSSLROOTCERT: str({ default: "" }),
PGSERVERNAME: str({ default: "" }),
PGAPPNAME: str({ default: "" }),
PGDEBUG: bool({ default: false }),
GOOGLE_CLIENT_ID: str(),
GOOGLE_CLIENT_SECRET: str(),
FACEBOOK_APP_ID: str(),
FACEBOOK_APP_SECRET: str(),
// GITHUB_APP_ID: str(),
// GITHUB_APP_KEY: str(),
// GITHUB_CLIENT_ID: str(),
// GITHUB_CLIENT_SECRET: str(),
EMAIL_FROM: str(),
EMAIL_REPLY_TO: str(),
SENDGRID_API_KEY: str(),
UPLOAD_BUCKET: str(),
STORAGE_BUCKET: str(),
});