From 5cbf6baa3a0fa36ae4c7d625ac358303a6454c12 Mon Sep 17 00:00:00 2001 From: waseem khadri Date: Thu, 9 Jul 2026 11:37:57 +0530 Subject: [PATCH] feat: update environment setup and script commands for consistency --- ENV_SETUP.md | 72 +++++++++++++++++++++++++--------------------------- package.json | 15 +++++------ 2 files changed, 40 insertions(+), 47 deletions(-) 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" },