mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 13:52:43 +08:00
* simplified get * resolved merge conflicts * removed default param for get * add dood setup * add readme * better build process * multi-stage build * revert makefile * rm entrypoint.sh * adjust ssh box for docker * update readme * update readme * fix hostname * change workspace setting * add workspace_mount_base * fixes for workspace dir * clean up frontend * refactor dockerfile * try download.py * change docker order a bit * remove workspace_dir from frontend settings * fix merge issues * Update opendevin/config.py * remove relpath logic from server * rename workspace_mount_base to workspace_base * remove workspace dir plumbing for now * delint * delint * move workspace base dir * remove refs to workspace_dir * factor out constant * fix local directory usage * dont require dir * fix docs * fix arg parsing for task * implement WORKSPACE_MOUNT_PATH * fix workspace dir * fix ports * fix merge issues * add makefile * revert settingsService * fix string * Add address * Update Dockerfile * Update local_box.py * fix lint * move to port 3000 --------- Co-authored-by: மனோஜ்குமார் பழனிச்சாமி <smartmanoj42857@gmail.com> Co-authored-by: enyst <engel.nyst@gmail.com>
35 lines
914 B
TypeScript
35 lines
914 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import viteTsconfigPaths from "vite-tsconfig-paths";
|
|
|
|
const BACKEND_HOST = process.env.BACKEND_HOST || "127.0.0.1:3000";
|
|
|
|
// check BACKEND_HOST is something like "example.com"
|
|
if (!BACKEND_HOST.match(/^([\w\d-]+(\.[\w\d-]+)+(:\d+)?)/)) {
|
|
throw new Error(
|
|
`Invalid BACKEND_HOST ${BACKEND_HOST}, example BACKEND_HOST 127.0.0.1:3000`,
|
|
);
|
|
}
|
|
|
|
export default defineConfig({
|
|
// depending on your application, base can also be "/"
|
|
base: "",
|
|
plugins: [react(), viteTsconfigPaths()],
|
|
clearScreen: false,
|
|
server: {
|
|
port: process.env.FRONTEND_PORT
|
|
? Number.parseInt(process.env.FRONTEND_PORT, 10)
|
|
: 3001,
|
|
proxy: {
|
|
"/api": {
|
|
target: `http://${BACKEND_HOST}/`,
|
|
changeOrigin: true,
|
|
},
|
|
"/ws": {
|
|
target: `ws://${BACKEND_HOST}/`,
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
});
|