-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
33 lines (32 loc) · 1020 Bytes
/
index.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
import constants from "./constants";
export default {
name: "starter-service",
version: process.env.VERSION ?? "v1",
domain: process.env.DOMAIN ?? "localhost",
port: process.env.PORT ?? 4000,
db: {
user: process.env.DB_USER ?? "postgres",
password: process.env.DB_PASSWORD ?? "postgres",
host: process.env.DB_HOST ?? "localhost",
port: process.env.DB_PORT ?? 5432,
},
jwt: {
tokenSecret: process.env.JWT_TOKEN_SECRET ?? "supersecretrandomstring",
},
redis: {
host: process.env.REDIS_HOST ?? "localhost",
port: Number(process.env.REDIS_PORT ?? 6379),
password: process.env.REDIS_PASSWORD ?? "",
},
openai: {
apiKey: process.env.OPENAI_API_KEY ?? "",
embeddings: {
model: process.env.OPENAI_EMBEDDINGS_MODEL ?? "text-embedding-3-small",
dimension: Number(process.env.OPENAI_EMBEDDINGS_DIMENSION ?? 1536),
},
chatCompletions: {
model: process.env.OPENAI_CHAT_COMPLETIONS_MODEL ?? "gpt-3.5-turbo",
},
},
constants,
} as const;