Skip to content

Commit

Permalink
feat: ✨ add DEFAULT_HOST
Browse files Browse the repository at this point in the history
  • Loading branch information
zhumeisongsong committed Nov 7, 2024
1 parent 22248fc commit 1649ebc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions libs/application-config/src/lib/applications-config.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
const DEFAULT_HOST = 'localhost';

const DEFAULT_PORT = {
user: 15001,
task: 15002,
gateway: 3333,
user: '15001',
task: '15002',
gateway: '3333',
};

// Gateway
export const gatewayConfig = {
host: process.env['GATEWAY_HOST'] ?? undefined,
host: process.env['GATEWAY_HOST'] ?? DEFAULT_HOST,
port: process.env['GATEWAY_PORT'] ?? DEFAULT_PORT.gateway,
};

// Graphql
export const userSubGraph = {
host: process.env['USER_HOST'] ?? undefined,
host: process.env['USER_HOST'] ?? DEFAULT_HOST,
port: process.env['USER_PORT'] ?? DEFAULT_PORT.user,
};

export const taskSubGraph = {
host: process.env['TASK_HOST'] ?? undefined,
host: process.env['TASK_HOST'] ?? DEFAULT_HOST,
port: process.env['TASK_PORT'] ?? DEFAULT_PORT.task,
};

0 comments on commit 1649ebc

Please sign in to comment.