Skip to content

Commit

Permalink
Update vite.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shivam-tiwari-21 authored Jan 4, 2025
1 parent f8bfa23 commit 09f3085
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
define: {
'process.env': process.env, // Pass environment variables explicitly
}, server: {
port: process.env.PORT || 3000, // Use Render's PORT variable or default to 3000
host: '0.0.0.0', // Bind to all network interfaces
'process.env': process.env,
},
server: {
port: process.env.PORT || 3000,
host: '0.0.0.0',
},
preview: {
port: process.env.PORT || 3000, // Use Render's PORT variable or default to 3000
host: '0.0.0.0', // Bind to all network interfaces
port: process.env.PORT || 3000,
host: '0.0.0.0',
},
})
base: '/', // Use '/' for root deployment
});

0 comments on commit 09f3085

Please sign in to comment.