config_public.js 1.73 KB
Newer Older
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
/*
    ### Configurations File.

    - 해당 파일은 공개용으로 작성한 것 입니다. 동일 디렉토리 상에서 config.js를 생성해 사용합니다.
    - 환경 변수들을 관리하는 파일입니다.
    - 개발 환경에 맞게 값들을 변경하여 사용합니다.
*/

// # Server Envs
const PROTOCOL = "http";
const HOST = "localhost";
const PORT = 4500;

// # DB Info.
const DB_USER = "postgres";
const DB_PASSWORD = "YOUR_PostgreSQL_PASSWORD";
const DB_HOST = "localhost";
const DB_PORT = "5432";
const DB_DATABASE = "YOUR_DB_NAME";

// # API.

// ## OpenWeatherMap
const OPENWEATHERMAP_API_KEY = "YOUR_OpenWeatherMap_API_KEY";

// # Nodemailer.
const NODEMAILER_SERVICE = "gmail";
const NODEMAILER_USER = "YOUR_MAIL_ADDRESS";
const NODEMAILER_GAMIL_CLIENT_ID = "YOUR_API_CLIENT_ID";
const NODEMAILER_GMAIL_CLIENT_PASSWORD = "YOUR_API_CLIENT_PASSWORD";
const NODEMAILER_GMAIL_REFRESH_TOKEN = "YOUR_GMAIL_REFRESH_TOKEN";

// # Secret Key.
const AUTH_MAIL_SECRETKEY = "YOUR_MAIL_SECRETKEY";
const AUTH_ACCESS_TOKEN_SECRETKEY = "YOUR_ACCESS_TOKEN_SECRETKEY";

const envs = {
  server: {
    protocol: PROTOCOL,
    host: HOST,
    port: PORT,
  },
  db: {
    user: DB_USER,
    password: DB_PASSWORD,
    host: DB_HOST,
    port: DB_PORT,
    database: DB_DATABASE,
  },
  api: {
    openweathermap: {
      api_key: OPENWEATHERMAP_API_KEY,
    },
    nodemailer: {
      service: NODEMAILER_SERVICE,
      user: NODEMAILER_USER,
      gmail_client_id: NODEMAILER_GAMIL_CLIENT_ID,
      gmail_client_passowrd: NODEMAILER_GMAIL_CLIENT_PASSWORD,
      gmail_refresh_token: NODEMAILER_GMAIL_REFRESH_TOKEN,
    },
  },
  secretKey: {
    mail: AUTH_MAIL_SECRETKEY,
    access_token: AUTH_ACCESS_TOKEN_SECRETKEY,
  },
};

export default envs;