Skip to content

Commit

Permalink
fix: redis environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
He1DAr committed Sep 14, 2023
1 parent 8fdc994 commit 95a68b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/utils/cache-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let client: Redis;

export function getCacheClient() {
if (!REDIS_URL) {
console.log('REDIS_URL is not defined');
console.log("REDIS_URL doesn't exist.");
return {
get: () => Promise.resolve(),
set: () => undefined,
Expand Down
7 changes: 7 additions & 0 deletions src/pages/token/[tokenId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ export const getServerSideProps: GetServerSideProps = async ({ params, query })
const isMainnet = query.chain === 'mainnet';
const isCustomApi = !!query.api;

console.log('process.env.REDIS_URL', process.env.REDIS_URL);
console.log('process.env.NODE_ENV', process.env.NODE_ENV);
console.log(
'process.env.NEXT_PUBLIC_TESTNET_API_SERVER',
process.env.NEXT_PUBLIC_TESTNET_API_SERVER
);

try {
if (!tokenId || !isMainnet || isCustomApi) {
throw new Error('cannot fetch token info for this request');
Expand Down

0 comments on commit 95a68b4

Please sign in to comment.