852 B
852 B
Vaessl: Frontend setup
Vite will act as development server for the React app. The necessary packages especially the correct NodeJs version are baked into the Docker image documented in code-server adjustments
Port 5173 needs to be exposed in the code-server container via port variable.
To ensure proper localhost Url generation the following server parameters need to be added to the vite.config.ts.
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
server: {
host: '0.0.0.0',
port: 5173,
allowedHosts: ['5173.code-server.your.website'],
},
})
Don't forget to add the host to your proxy service.