- Add .env.example with PORT, MySQL, JWT, and OSS configuration - Create schema.sql with users, projects, oss_files, and hazards tables - Implement env.ts with Zod-based environment variable parsing - Implement db.ts with MySQL connection pool using mysql2/promise - Update /health endpoint to return service metadata - Update health test to verify service name - Install zod and mysql2 dependencies Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
17 lines
290 B
Plaintext
17 lines
290 B
Plaintext
# Server Configuration
|
|
PORT=3000
|
|
|
|
# MySQL Database
|
|
MYSQL_HOST=localhost
|
|
MYSQL_PORT=3306
|
|
MYSQL_USER=root
|
|
MYSQL_PASSWORD=your_password
|
|
MYSQL_DATABASE=smart_project
|
|
|
|
# JWT Authentication
|
|
JWT_SECRET_KEY=your_jwt_secret_key_here
|
|
|
|
# OSS Storage
|
|
OSS_BUCKET=your_bucket_name
|
|
OSS_REGION=your_region
|