Skip to content

Commit

Permalink
Fix configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ir4y committed Aug 17, 2023
1 parent 5e4789b commit f7404b9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
2 changes: 0 additions & 2 deletions shared/src/constants.develop.ts

This file was deleted.

2 changes: 0 additions & 2 deletions shared/src/constants.production.ts

This file was deleted.

1 change: 0 additions & 1 deletion shared/src/constants.staging.ts

This file was deleted.

2 changes: 2 additions & 0 deletions shared/src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const baseURL = (window as any).BASE_URL ?? 'http://localhost:8080/';
export const juteURL = (window as any).JUTE_URL ?? 'http://localhost:8090/'
12 changes: 3 additions & 9 deletions web/src/services/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@ import { setInstanceBaseURL as setAidboxInstanceBaseURL } from 'aidbox-react/lib

import { setInstanceBaseURL as setFHIRInstanceBaseURL } from 'fhir-react/lib/services/instance';

import { baseURL, juteURL } from 'shared/src/constants.develop';
import { baseURL, juteURL } from 'shared/src/constants';

setAidboxInstanceBaseURL(
(window as any).BASE_URL === '{{BASE_URL}}' ? baseURL : (window as any).BASE_URL,
);
setFHIRInstanceBaseURL(
(window as any).BASE_URL === '{{BASE_URL}}'
? `${baseURL}/fhir`
: `${(window as any).BASE_URL}/fhir`,
);
setAidboxInstanceBaseURL(baseURL);
setFHIRInstanceBaseURL(`${baseURL}/fhir`);

export { baseURL, juteURL };

0 comments on commit f7404b9

Please sign in to comment.