Skip to content

Commit a2df750

Browse files
committed
fix: environment variables working
All the environment variables in a react project require "REACT_APP" in the beginning of their names for them to work.
1 parent 0b47332 commit a2df750

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const errorLink = onError(({ graphqlErrors, networkError }) => {
3939

4040
const link = from([
4141
errorLink,
42-
new HttpLink({ uri: 'http://localhost:4000/graphql', credentials: 'include' }),
42+
new HttpLink({ uri: process.env.REACT_APP_PUBLIC_API_URL, credentials: 'include' }),
4343
]);
4444

4545
const client = new ApolloClient({

0 commit comments

Comments
 (0)