Skip to content

Commit

Permalink
fix: uses correct env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoshnirmalya committed Jul 28, 2020
1 parent ba71260 commit d377a33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions frontend/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
API_URL=http://localhost:8080/v1/graphql
WS_URL=ws://localhost:8080/v1/graphql
NEXT_PUBLIC_API_URL=http://localhost:8080/v1/graphql
NEXT_PUBLIC_WS_URL=ws://localhost:8080/v1/graphql
DATABASE_URL=postgres://postgres:@localhost:5432/postgres
AUTH_PRIVATE_KEY=""
AUTH_PUBLIC_KEY=""
Expand Down
4 changes: 2 additions & 2 deletions frontend/lib/with-graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SubscriptionClient } from "subscriptions-transport-ws";
import ws from "isomorphic-ws";

const subscriptionClient = new SubscriptionClient(
process.env.WS_URL || "ws://localhost:8080/v1/graphql",
process.env.NEXT_PUBLIC_WS_URL || "ws://localhost:8080/v1/graphql",
{
reconnect: true,
connectionParams: {
Expand All @@ -15,7 +15,7 @@ const subscriptionClient = new SubscriptionClient(
);

const client = new Client({
url: process.env.API_URL || "http://localhost:8080/v1/graphql",
url: process.env.NEXT_PUBLIC_API_URL || "http://localhost:8080/v1/graphql",
fetch,
fetchOptions: {
headers: { "X-Hasura-Admin-Secret": "secret" },
Expand Down

1 comment on commit d377a33

@vercel
Copy link

@vercel vercel bot commented on d377a33 Jul 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.