Skip to content

Commit

Permalink
fix: use VITE_ prefix (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspb authored Feb 3, 2024
1 parent 03f7063 commit c204dc1
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 72 deletions.
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ DATABASE_NAME=meteroid
DATABASE_URL=postgres://${DATABASE_USER}:${DATABASE_PASSWORD}@localhost:5432/${DATABASE_NAME}?sslmode=disable

## Web front
VITE_DEBUG_MODE=${DEBUG}
VITE_API_URL=http://127.0.0.1:${WEB_API_PORT}
VITE_METEROID_API_EXTERNAL_URL=${METEROID_API_EXTERNAL_URL}

## Kafka
KAFKA_BOOTSTRAP_SERVERS=127.0.0.1:9092
Expand Down
1 change: 0 additions & 1 deletion modules/web/web-app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { TransportProvider } from '@connectrpc/connect-query'
import { createGrpcWebTransport } from '@connectrpc/connect-web'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
import { RouterProvider } from 'react-router-dom'

import { authInterceptor, errorInterceptor, loggingInterceptor } from '@/lib/connectrpc'
Expand Down
11 changes: 0 additions & 11 deletions modules/web/web-app/hooks/useFlags.tsx

This file was deleted.

8 changes: 2 additions & 6 deletions modules/web/web-app/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@ import { parseEnv } from '@md/common'
import { z } from 'zod'

const _env = parseEnv(import.meta.env, {
VITE_DEBUG_MODE: z.boolean().default(false),
VITE_API_URL: z.string().default('http://127.0.0.1:8000'),
METEROID_API_EXTERNAL_URL: z.string().default('http://127.0.0.1:50061'),
VITE_METEROID_API_EXTERNAL_URL: z.string().default('http://127.0.0.1:50061'),
})

export const env = {
isDebug: _env.VITE_DEBUG_MODE,
apiUrl: _env.VITE_API_URL,
meteroidApiUri: _env.METEROID_API_EXTERNAL_URL,
meteroidApiUri: _env.VITE_METEROID_API_EXTERNAL_URL,
}
52 changes: 0 additions & 52 deletions modules/web/web-app/providers/FlagsProvider.tsx

This file was deleted.

0 comments on commit c204dc1

Please sign in to comment.