Fix API endpoint configuration with environment-aware URLs

- Add environment-based API URL configuration (dev: localhost:8000, prod: api.pennyzo.com)
- Update PennyzoApiService to use centralized config with timeout settings
- Fix API status checker scripts to load .env variables using dotenv
- Add environment management scripts (set-env.ps1) with npm shortcuts
- Create comprehensive configuration testing and validation tools
- Add TypeScript definitions for Vite environment variables
- Update all documentation with new environment configuration instructions
- Install dotenv package for Node.js environment variable loading
- All APIs now correctly use environment-appropriate URLs automatically
This commit is contained in:
2025-09-25 14:40:20 +05:30
parent aece15a286
commit ebb7fcaac8
15 changed files with 742 additions and 11 deletions

13
package-lock.json generated
View File

@@ -10,6 +10,7 @@
"dependencies": {
"axios": "^1.12.2",
"chalk": "^4.1.2",
"dotenv": "^17.2.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.9.0"
@@ -1779,6 +1780,18 @@
"dev": true,
"license": "MIT"
},
"node_modules/dotenv": {
"version": "17.2.2",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.2.tgz",
"integrity": "sha512-Sf2LSQP+bOlhKWWyhFsn0UsfdK/kCWRv1iuA2gXAwt3dyNabr6QSj00I2V10pidqz69soatm9ZwZvpQMTIOd5Q==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",