Skip to content

Commit

Permalink
increase refresh intervals
Browse files Browse the repository at this point in the history
also load config form env if present
  • Loading branch information
JakubSmahovsky committed Jan 31, 2023
1 parent 9e51732 commit 8be1568
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions config/default.ts
@@ -1,11 +1,11 @@
export default ({
export default {
priceAPI: {
url: process.env.CRYPTOCOMPARE_URL || "https://min-api.cryptocompare.com",
key: process.env.CRYPTOCOMPARE_KEY || ""
url: process.env.CRYPTOCOMPARE_URL ?? "https://min-api.cryptocompare.com",
key: process.env.CRYPTOCOMPARE_KEY ?? "",
},
APIGenerated: {
refreshBackoffCap: 60000*60*3,
refreshInterval: 60000, // refreshes once per min
port: 8090
}
} as ConfigType);
refreshBackoffCap: process.env.REFRESH_BACKOFF_CAP ?? 60000 * 60 * 3,
refreshInterval: process.env.REFRESH_INTERVAL ?? 60000 * 5, // refreshes every 5 mins
port: process.env.PORT ?? 8090,
},
} as ConfigType;
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8be1568

Please sign in to comment.