diff --git a/README.md b/README.md new file mode 100644 index 0000000..3b617b2 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Informatics Large Practical Coursework 3 + +## Installation + +### Docker Compose + +```bash +docker-compose up -d +``` + +Then access the application at `http://localhost:4173`. + +If `Network Error` occurs, try + +```bash +chromium --user-data-dir="/tmp/chromium" --disable-web-security +``` + +since CORS is not handled in this setup. diff --git a/drone-frontend/src/components/Sidebar.svelte b/drone-frontend/src/components/Sidebar.svelte index 45a0612..f778292 100644 --- a/drone-frontend/src/components/Sidebar.svelte +++ b/drone-frontend/src/components/Sidebar.svelte @@ -176,7 +176,7 @@ id="api" type="text" bind:value={apiBase} - placeholder="http://localhost..." + placeholder="/api" class="w-full bg-white/50 dark:bg-black/30 border border-slate-300 dark:border-slate-700 text-slate-800 dark:text-slate-100 p-2 rounded-lg font-mono text-xs transition-all focus:outline-none focus:border-sky-500 focus:bg-white dark:focus:bg-black/50 focus:ring-2 focus:ring-sky-500/20" /> @@ -191,7 +191,7 @@ id="bb" type="text" bind:value={blackBoxBase} - placeholder="http://localhost..." + placeholder="/snapshot" class="w-full bg-white/50 dark:bg-black/30 border border-slate-300 dark:border-slate-700 text-slate-800 dark:text-slate-100 p-2 rounded-lg font-mono text-xs transition-all focus:outline-none focus:border-sky-500 focus:bg-white dark:focus:bg-black/50 focus:ring-2 focus:ring-sky-500/20" /> diff --git a/drone-frontend/vite.config.js b/drone-frontend/vite.config.js index 6a8ead9..a1bee84 100644 --- a/drone-frontend/vite.config.js +++ b/drone-frontend/vite.config.js @@ -1,9 +1,18 @@ +import { defineConfig } from 'vite'; import { svelte } from '@sveltejs/vite-plugin-svelte'; -export default { +export default defineConfig({ plugins: [svelte()], server: { - port: 4173, - strictPort: true - } -}; + proxy: { + '/api': { + target: 'http://localhost:8080', + changeOrigin: true, + }, + '/snapshot': { + target: 'http://localhost:3000', + changeOrigin: true, + }, + }, + }, +});