Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/deploy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:

- name: Build frontend
working-directory: frontend
env:
VITE_API_BASE_URL: ${{ secrets.DEV_API_BASE_URL }}
run: npm run build

- name: Deploy
Expand Down
2 changes: 2 additions & 0 deletions frontend/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# API Base URL for production
VITE_API_BASE_URL=https://your-domain.com/api/v1
2 changes: 1 addition & 1 deletion frontend/src/lib/api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios';
import type { Book, Publisher, Tag, PaginatedResponse } from '@/types';

const API_BASE_URL = 'http://localhost:8001/api/v1';
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || 'http://localhost:8001/api/v1';

const api = axios.create({
baseURL: API_BASE_URL,
Expand Down