Skip to content

Commit

Permalink
Merge pull request #9 from MatheusDubin/remove-production-api-string
Browse files Browse the repository at this point in the history
fix: remove hardcoded production string as fallback from no VITE_API_…
  • Loading branch information
fagundesjg authored May 9, 2024
2 parents d2f0a55 + 0dd354e commit 384fc8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:

- run: npm install

- name: Create .env file
run: |
touch .env
echo VITE_API_URL=${{ secrets.VITE_API_URL }} >> .env
cat .env
- run: npm run build

- uses: aws-actions/configure-aws-credentials@v1
Expand Down
2 changes: 1 addition & 1 deletion src/api/api.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios, { AxiosRequestHeaders } from 'axios';

const api = axios.create({
baseURL: import.meta.env.VITE_API_URL ?? 'https://api.sos-rs.com',
baseURL: import.meta.env.VITE_API_URL ?? 'http://localhost:4000/',
});

api.interceptors.request.use((config) => {
Expand Down

0 comments on commit 384fc8d

Please sign in to comment.