Skip to content

Commit

Permalink
fix api url
Browse files Browse the repository at this point in the history
  • Loading branch information
danadajian committed Mar 1, 2025
1 parent ec3565c commit 1b3c114
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ COPY . .
RUN bun install --production
RUN bun build:web

ENV API_URL "http://localhost:3000"
CMD [ "bun", "start" ]
6 changes: 1 addition & 5 deletions app.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { ExpoConfig, ConfigContext } from 'expo/config';

const { env } = process;
if (!('API_URL' in env)) throw new Error('Missing API_URL env variable.');
const apiUrl = env.API_URL;

export default ({ config }: ConfigContext): ExpoConfig => ({
...config,
name: 'LastDram',
Expand Down Expand Up @@ -43,7 +39,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
policy: 'sdkVersion'
},
extra: {
apiUrl: process.env.NODE_ENV === 'development' ? 'http://localhost:3000' : apiUrl,
apiUrl: process.env.NODE_ENV === 'development' ? 'http://localhost:3000' : 'API_URL' in process.env ? process.env.API_URL : '',
clerkPublishableKey: 'pk_test_dml0YWwtcGVnYXN1cy05OS5jbGVyay5hY2NvdW50cy5kZXYk',
eas: {
projectId: 'd7810d9a-0b36-4926-b882-a60ae58c5246'
Expand Down

0 comments on commit 1b3c114

Please sign in to comment.