27 lines
852 B
Markdown
27 lines
852 B
Markdown
**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.
|
|
|