-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.ts
29 lines (25 loc) · 854 Bytes
/
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
import { env } from 'process';
export const DIALECT = 'mysql';
const LOCAL_CONFIGURATION = {
API_ENDPOINT: 'localhost',
DB: 'soundmolto',
PASSWORD: '',
PORT_DB: 3306,
SERVER: 'localhost',
USER_DB: 'root',
};
const PRODUCTION_CONFIGURATION = {
DB: env.DB || 'soundmolto',
PASSWORD: env.PASSWORD || 'root',
PORT_DB: env.PORT_DB ? Number(env.PORT_DB) : 3306,
SERVER: env.SERVER || 'localhost',
USER_DB: env.USER_DB || 'root',
};
export const config = {
API_ENDPOINT: env.API_ENDPOINT || 'localhost',
CONSTANT_INJECTION: env.CONSTANT_INJECTION || 'ireallylikethepartwherethisisasecret',
DATABASE: env.NODE_ENV === 'PRODUCTION' ? PRODUCTION_CONFIGURATION : LOCAL_CONFIGURATION,
HASH_SECRET: env.HASH_SECRET || 'h&^335hGVzuwAQ&&%$@ed233%',
PORT_APP: env.PORT ? Number(env.PORT) : 1344,
SECRET: env.SECRET || 'HltH3R3',
};