Skip to content

Commit

Permalink
fix: env default values
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Feb 27, 2023
1 parent a851568 commit 867fc63
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ const schema = Type.Object({
* * `writeonly`: Runs only background jobs
* * `readonly`: Runs only the REST API server
*/
RUN_MODE: Type.Enum({ default: 'default', readonly: 'readonly', writeonly: 'writeonly' }),
RUN_MODE: Type.Enum(
{ default: 'default', readonly: 'readonly', writeonly: 'writeonly' },
{ default: 'default' }
),

/** Hostname of the API server */
API_HOST: Type.String(),
API_HOST: Type.String({ default: '0.0.0.0' }),
/** Port in which to serve the API */
API_PORT: Type.Number({ default: 3000, minimum: 0, maximum: 65535 }),

Expand All @@ -34,8 +37,8 @@ const schema = Type.Object({
PG_IDLE_TIMEOUT: Type.Number({ default: 30 }),
PG_MAX_LIFETIME: Type.Number({ default: 60 }),

BITCOIN_RPC_HOST: Type.String(),
BITCOIN_RPC_PORT: Type.Number(),
BITCOIN_RPC_HOST: Type.String({ default: '0.0.0.0' }),
BITCOIN_RPC_PORT: Type.Number({ default: 8332 }),
});
type Env = Static<typeof schema>;

Expand Down

0 comments on commit 867fc63

Please sign in to comment.