feat: convert server to TypeScript + add ERP API proxy
- Migrate server/index.js → modular TS structure (config, routes, services) - Add ERP proxy: GET /api/erp/sales proxies Hono ERP API with server-side auth - JWT token cached server-side, auto-refreshes on 401 - ERP credentials stay server-side only (no VITE_ prefix) - Vite dev proxy routes /api/erp → localhost:3001 - Preserve existing Salla OAuth integration Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,16 +1,23 @@
|
||||
{
|
||||
"name": "hihala-salla-server",
|
||||
"name": "hihala-server",
|
||||
"version": "1.0.0",
|
||||
"description": "Backend server for Salla OAuth and API integration",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"description": "Backend server for ERP proxy and Salla integration",
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"start": "node index.js",
|
||||
"dev": "node --watch index.js"
|
||||
"start": "tsx src/index.ts",
|
||||
"dev": "tsx watch src/index.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.6.0",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^16.3.1",
|
||||
"express": "^4.18.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/express": "^4.17.21",
|
||||
"tsx": "^4.19.0",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user