no interpolation in render.yaml 🌮

This commit is contained in:
Will Holcomb
2021-03-19 02:18:22 -04:00
committed by Alec LaLonde
parent f7dc6e6d76
commit 7471a38d82
2 changed files with 6 additions and 11 deletions

View File

@@ -1,15 +1,12 @@
export const CONFIG = {
graphqlURL: ((() => {
const {
NEXT_PUBLIC_GRAPHQL_URL: url,
NEXT_PUBLIC_GRAPHQL_HOST: host,
} = process.env;
if (url) return url;
if (host) {
return `https://${host}.onrender.com/v1/graphql`;
if (process.env.NEXT_PUBLIC_GRAPHQL_URL) {
return process.env.NEXT_PUBLIC_GRAPHQL_URL
}
return 'http://localhost:8080/v1/graphql';
if (process.env.GRAPHQL_HOST) {
return `https://${process.env.GRAPHQL_HOST}.onrender.com/v1/graphql`
}
return 'http://localhost:8080/v1/graphql'
})()),
infuraId:
process.env.NEXT_PUBLIC_INFURA_ID || '781d8466252d47508e177b8637b1c2fd',