fix: the fayda and etrade syncing

This commit is contained in:
Nathnael
2026-08-05 13:00:43 +00:00
parent a0f0be5be5
commit 8476a6a00e
7 changed files with 197 additions and 62 deletions

View File

@@ -1,3 +1,6 @@
# Dev server port. Default: 5283.
PORT=5283
VITE_API_URL=http://localhost:3001
VITE_BASE_API_URL=http://localhost:3001

View File

@@ -4,7 +4,7 @@
"private": true,
"type": "module",
"scripts": {
"dev": "vite --port 5183 --clearScreen false",
"dev": "vite --clearScreen false",
"prebuild": "node -e \"const fs=require('fs'); fs.rmSync('dist',{recursive:true,force:true});\"",
"build": "vite build",
"preview": "vite preview --port 5183",

View File

@@ -2,6 +2,7 @@ import path from "node:path";
import { fileURLToPath } from "node:url";
import { createRequire } from "node:module";
import { loadEnv } from "vite";
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
@@ -10,7 +11,9 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
const require = createRequire(import.meta.url);
const streamBrowserifyPath = require.resolve("stream-browserify");
export default defineConfig(() => {
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, __dirname, "");
return {
plugins: [react(), tailwindcss()],
resolve: {
@@ -31,7 +34,7 @@ export default defineConfig(() => {
dedupe: ["react", "react-dom", "@mantine/core", "@mantine/hooks"],
},
server: {
port: 5183,
port: Number(env.PORT) || 5283,
host: "0.0.0.0",
},
test: {