diff --git a/.env.dev b/.env.dev index 87b31f8..313e4cf 100644 --- a/.env.dev +++ b/.env.dev @@ -1,5 +1,4 @@ # Development Environment -VITE_API_URL=https://ardev-api.maskantech.in:9501 +VITE_API_URL=https://ardev-api.maskantech.in/api VITE_ENV=dev VITE_APP_NAME=AeroResolve (Dev) -VITE_FRONTEND_URL=https://ardev.maskantech.in diff --git a/.env.test b/.env.test index 6bf3598..5b568da 100644 --- a/.env.test +++ b/.env.test @@ -1,5 +1,4 @@ # Test/QA Environment -VITE_API_URL=https://artest-api.maskantech.in:9502 +VITE_API_URL=https://artest-api.maskantech.in/api VITE_ENV=test VITE_APP_NAME=AeroResolve (Test) -VITE_FRONTEND_URL=https://artest.maskantech.in diff --git a/ENV_SETUP.md b/ENV_SETUP.md index f29d1cc..8609cae 100644 --- a/ENV_SETUP.md +++ b/ENV_SETUP.md @@ -23,42 +23,33 @@ This project supports multiple environment configurations for local development, ## Running the Application -### Development Servers (Local) +### Development Servers + +- **Dev Environment (Port 9501):** + ```bash + npm run dev + ``` + +- **Test Environment (Port 9502):** + ```bash + npm run test + ``` + +- **UAT Environment (Port 5176):** + ```bash + npm run uat + ``` - **Local Development (Port 5174):** ```bash npm run dev:local ``` - or simply: - ```bash - npm run dev - ``` - -- **Dev Environment (Port 5174):** - ```bash - npm run dev:dev - ``` - -- **Test Environment (Port 5175):** - ```bash - npm run dev:test - ``` - -- **UAT Environment (Port 5176):** - ```bash - npm run dev:uat - ``` ### Building for Production -- **Build for Local:** - ```bash - npm run build:local - ``` - - **Build for Dev:** ```bash - npm run build:dev + npm run build ``` - **Build for Test:** @@ -71,16 +62,16 @@ This project supports multiple environment configurations for local development, npm run build:uat ``` -### Preview Production Build - -- **Preview Local Build:** +- **Build for Local:** ```bash - npm run preview:local + npm run build:local ``` +### Preview Production Build + - **Preview Dev Build:** ```bash - npm run preview:dev + npm run preview ``` - **Preview Test Build:** @@ -93,6 +84,11 @@ This project supports multiple environment configurations for local development, npm run preview:uat ``` +- **Preview Local Build:** + ```bash + npm run preview:local + ``` + ## Environment Variables Each environment file contains these variables: @@ -120,14 +116,14 @@ const baseURL = import.meta.env.VITE_API_URL ## Development Ports -Each environment runs on a different port to allow running multiple instances: +Each environment runs on a different port: -| Environment | Port | -|------------|-------| -| Local | 5174 | -| Dev | 5174 | -| Test | 5175 | -| UAT | 5176 | +| Environment | Port | Command | +|------------|-------|---------------| +| Dev | 9501 | `npm run dev` | +| Test | 9502 | `npm run test`| +| UAT | 5176 | `npm run uat` | +| Local | 5174 | `npm run dev:local` | ## Notes diff --git a/package.json b/package.json index 87f4a85..a50167e 100644 --- a/package.json +++ b/package.json @@ -4,20 +4,17 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite", - "dev:local": "vite --mode local", - "dev:dev": "vite --mode dev", - "dev:test": "vite --mode test", - "dev:uat": "vite --mode uat", - "build": "tsc -b && vite build", + "dev": "vite --mode dev", + "local": "vite --mode local", + "test": "vite --mode test", + "uat": "vite --mode uat", + "build": "tsc -b && vite build --mode dev", "build:local": "tsc -b && vite build --mode local", - "build:dev": "tsc -b && vite build --mode dev", "build:test": "tsc -b && vite build --mode test", "build:uat": "tsc -b && vite build --mode uat", "lint": "eslint .", - "preview": "vite preview", + "preview": "vite preview --mode dev", "preview:local": "vite preview --mode local", - "preview:dev": "vite preview --mode dev", "preview:test": "vite preview --mode test", "preview:uat": "vite preview --mode uat" },