chore: document and standardize hosts/ports across apps

This commit is contained in:
2025-09-10 01:21:15 +05:30
parent 701ff61214
commit 70cfff90ce
13 changed files with 218 additions and 42 deletions

View File

@@ -1,2 +1,4 @@
VITE_API_BASE_URL_BACKEND=http://localhost:5000
NODE_ENV=development
HOST=0.0.0.0
PORT=3000
VITE_API_BASE_URL_BACKEND=http://localhost:5000

View File

@@ -1,19 +1,20 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path';
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
// https://vite.dev/config/
export default defineConfig({
plugins: [
react(),
],
server: {
port: 3000,
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
}
}
return {
plugins: [react()],
server: {
host: env.HOST,
port: Number(env.PORT),
},
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
},
},
};
});