Skip to content

Commit

Permalink
add api proxy for development
Browse files Browse the repository at this point in the history
  • Loading branch information
ehanahamed committed Jan 12, 2025
1 parent 868b844 commit 0820845
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion web/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@ import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';

export default defineConfig({
plugins: [sveltekit()]
plugins: [sveltekit()],
server: {
proxy: {
"/api": {
target: "http://localhost:8008",
changeOrigin: true,
rewrite: function (path) {
return path.replace(/^\/api/, "");
}
}
}
}
});

0 comments on commit 0820845

Please sign in to comment.