Skip to content

Commit

Permalink
Testing environment variables for frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
basshamut committed Jun 27, 2024
1 parent 773321d commit a075e25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
echo "FRONTEND_URL=${FRONTEND_URL}" >> /var/www/html/virtual-dojo/backend/.env
echo "STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}" >> /var/www/html/virtual-dojo/backend/.env
EOF
# Conectar al VPS y reiniciar el backend
sshpass -p "${SSH_PASSWORD}" ssh -o StrictHostKeyChecking=no "${SSH_USERNAME}@${SSH_HOST}" << 'EOF'
cd /var/www/html/virtual-dojo/backend
Expand Down
7 changes: 2 additions & 5 deletions frontend/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
base: '/virtual-dojo/frontend/',
plugins: [react()],
Expand All @@ -10,9 +9,7 @@ export default defineConfig({
'/api': 'http://localhost:5000',
},
},
define: {
'process.env': {
VITE_API_URL: process.env.VITE_API_URL,
}
env: {
VITE_API_URL: process.env.VITE_API_URL,
}
})

0 comments on commit a075e25

Please sign in to comment.