feat: implement configuration management system

- Add comprehensive TypeScript interfaces for all config types
- Implement ConfigManager singleton class with layered loading
- Support for default, environment-specific, and environment variable configs
- Add example .env file for sensitive configuration

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Misaka
2026-02-28 22:10:41 +08:00
parent fb6f2bbc02
commit ae60273782
5 changed files with 193 additions and 0 deletions

18
config/.env.example Normal file
View File

@@ -0,0 +1,18 @@
# SQL Server
SQL_SERVER_SERVER=192.168.110.114
SQL_SERVER_DATABASE=CompanyDB
SQL_SERVER_USERNAME=peng
SQL_SERVER_PASSWORD=your_password_here
SQL_SERVER_DRIVER=ODBC Driver 18 for SQL Server
SQL_SERVER_TRUST_CERT=yes
# MySQL
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_DATABASE=erp_db
MYSQL_USERNAME=root
MYSQL_PASSWORD=your_password_here
# ERP Credentials (optional, can also be entered in UI)
ERP_USERNAME=BLDpengqiangqiang
ERP_PASSWORD=your_password_here