Skip to content

Commit

Permalink
Merge pull request elizaOS#1239 from jonathangus/develop
Browse files Browse the repository at this point in the history
fix: Sync UI Client with server port env
  • Loading branch information
monilpat authored Dec 19, 2024
2 parents 1edb372 + 90a6b91 commit 6cb9134
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { defineConfig } from "vite";
import topLevelAwait from "vite-plugin-top-level-await";
import react from "@vitejs/plugin-react";
import wasm from "vite-plugin-wasm";
import { config } from "dotenv";

config({ path: path.resolve(__dirname, "../.env") });

// https://vite.dev/config/
export default defineConfig({
Expand All @@ -26,7 +29,7 @@ export default defineConfig({
server: {
proxy: {
"/api": {
target: "http://localhost:3000",
target: `http://localhost:${process.env.SERVER_PORT || 3000}`,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
Expand Down

0 comments on commit 6cb9134

Please sign in to comment.