-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.ts
31 lines (27 loc) · 908 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
30
31
import { config } from "https://deno.land/x/[email protected]/mod.ts";
const conf = config({ safe: true, allowEmptyValues: true });
export interface XeonConfig {
ARANGO_URI: string;
ARANGO_USER: string;
ARANGO_PASSWORD: string;
ARANGO_COLLECTIONS: string[];
WEBSOCKET_HOST: string;
WEBSOCKET_PORT: number;
WEBSOCKET_SSL_KEY?: string;
WEBSOCKET_SSL_CERT?: string;
HTTP_HOST: string;
HTTP_PORT: number;
}
const _config: XeonConfig = {
ARANGO_URI: conf.ARANGO_URI,
ARANGO_PASSWORD: conf.ARANGO_PASSWORD,
ARANGO_USER: conf.ARANGO_USER,
ARANGO_COLLECTIONS: conf.ARANGO_COLLECTIONS.split(",").map((v) => v.trim()),
WEBSOCKET_HOST: conf.WEBSOCKET_HOST,
WEBSOCKET_PORT: Number(conf.WEBSOCKET_PORT),
WEBSOCKET_SSL_CERT: conf.WEBSOCKET_SSL_CERT,
WEBSOCKET_SSL_KEY: conf.WEBSOCKET_SSL_KEY,
HTTP_HOST: conf.HTTP_HOST,
HTTP_PORT: Number(conf.HTTP_PORT),
};
export default _config;