setup-frontend-environment #21

Merged
kasun merged 5 commits from setup-frontend-environment into main 2026-03-24 04:21:47 +01:00
Showing only changes of commit 89b4a297fe - Show all commits
+26
View File
@@ -0,0 +1,26 @@
**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](https://gitea.kasuns.website/kasun/Vaessl/src/branch/main/docs/02-Preparation/01-code-server-adjustments.md)
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.