tryin' to capture port 🚢

This commit is contained in:
Will Holcomb
2021-03-19 04:01:02 -04:00
committed by Alec LaLonde
parent 7d01b50fd7
commit f3683f54c1
2 changed files with 6 additions and 3 deletions

View File

@@ -4,7 +4,10 @@ export const CONFIG = {
return process.env.NEXT_PUBLIC_GRAPHQL_URL;
}
if (process.env.GRAPHQL_HOSTPORT) {
return `https://${process.env.GRAPHQL_HOSTPORT}.onrender.com/v1/graphql`;
const [host, ...port] = (
process.env.GRAPHQL_HOSTPORT.split(':')
);
return `https://${host}.onrender.com:${port}/v1/graphql`;
}
return 'http://localhost:8080/v1/graphql';
})()),