Skip to content

Commit

Permalink
Merge pull request #65 from IFRCGo/fix/use-env-config
Browse files Browse the repository at this point in the history
Use .env configuration file to configure endpoint
  • Loading branch information
barshathakuri authored Apr 26, 2024
2 parents 0c65b4e + b89ac4c commit 33e03ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ import {
InMemoryCache,
} from '@apollo/client';

import { api } from '#config';

import App from './App';

const webappRootId = 'webapp-root';
const webappRootElement = document.getElementById(webappRootId);
const APP_GRAPHQL_ENDPOINT = 'http://localhost:8000/graphql/';
const client = new ApolloClient({
uri: APP_GRAPHQL_ENDPOINT,
uri: api,
cache: new InMemoryCache(),
});
if (!webappRootElement) {
Expand Down

0 comments on commit 33e03ca

Please sign in to comment.