Skip to content

Commit 49aede0

Browse files
author
FalkWolsky
committed
Adaption in naming of global vars for API & Node-Service
1 parent 200bd8a commit 49aede0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

client/packages/lowcoder/vite.config.mts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import { globalDepPlugin } from "./src/dev-utils/globalDepPlguin";
1616

1717
dotenv.config();
1818

19-
const apiProxyTarget = process.env.LOWCODER_API_SERVICE_URL;
20-
const nodeServiceApiProxyTarget = process.env.LOWCODER_NODE_SERVICE_URL;
19+
const apiServiceUrl = process.env.LOWCODER_API_SERVICE_URL;
20+
const nodeServiceUrl = process.env.LOWCODER_NODE_SERVICE_URL;
2121
const nodeEnv = process.env.NODE_ENV ?? "development";
2222
const isDev = nodeEnv === "development";
2323
const isVisualizerEnabled = !!process.env.ENABLE_VISUALIZER;
@@ -26,7 +26,7 @@ const isVisualizerEnabled = !!process.env.ENABLE_VISUALIZER;
2626
const browserCheckFileName = `browser-check.js`;
2727
const base = ensureLastSlash(process.env.PUBLIC_URL);
2828

29-
if (!apiProxyTarget && isDev) {
29+
if (!apiServiceUrl && isDev) {
3030
console.log();
3131
console.log(chalk.red`LOWCODER_API_SERVICE_URL is required.\n`);
3232
console.log(chalk.cyan`Start with command: LOWCODER_API_SERVICE_URL=\{backend-api-addr\} yarn start`);
@@ -36,14 +36,14 @@ if (!apiProxyTarget && isDev) {
3636

3737
const proxyConfig: ServerOptions["proxy"] = {
3838
"/api": {
39-
target: apiProxyTarget,
39+
target: apiServiceUrl,
4040
changeOrigin: false,
4141
},
4242
};
4343

44-
if (nodeServiceApiProxyTarget) {
44+
if (nodeServiceUrl) {
4545
proxyConfig["/node-service"] = {
46-
target: nodeServiceApiProxyTarget,
46+
target: nodeServiceUrl,
4747
};
4848
}
4949

0 commit comments

Comments
 (0)