feat: update environment setup and script commands for consistency

This commit is contained in:
waseem khadri
2026-07-09 11:37:57 +05:30
parent 447f0b567f
commit 5cbf6baa3a
2 changed files with 40 additions and 47 deletions
+34 -38
View File
@@ -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
+6 -9
View File
@@ -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"
},