- Integrated Redis for distributed rate limiting using `rate-limit-redis`. - Updated `README.md` to include Redis caching strategy and configuration details. - Enhanced architecture diagram to reflect Redis usage. - Added new dependencies for `ioredis`, `opossum`, and their respective type definitions. - Updated application configuration to include Redis URL. - Improved bilingual documentation throughout the service template.
55 lines
1.5 KiB
JSON
55 lines
1.5 KiB
JSON
{
|
|
"name": "@goodgo/service-template",
|
|
"version": "1.0.0",
|
|
"description": "Template for creating new microservices",
|
|
"main": "./dist/main.js",
|
|
"scripts": {
|
|
"dev": "tsx watch src/main.ts",
|
|
"build": "tsc",
|
|
"start": "node dist/main.js",
|
|
"test": "jest",
|
|
"test:watch": "jest --watch",
|
|
"test:coverage": "jest --coverage",
|
|
"lint": "eslint src --ext .ts",
|
|
"typecheck": "tsc --noEmit",
|
|
"prisma:generate": "prisma generate",
|
|
"prisma:migrate": "prisma migrate dev",
|
|
"prisma:deploy": "prisma migrate deploy",
|
|
"prisma:seed": "tsx prisma/seed.ts",
|
|
"clean": "rm -rf dist"
|
|
},
|
|
"dependencies": {
|
|
"@goodgo/auth-sdk": "workspace:*",
|
|
"@goodgo/logger": "workspace:*",
|
|
"@goodgo/tracing": "workspace:*",
|
|
"@goodgo/types": "workspace:*",
|
|
"@prisma/client": "^5.9.1",
|
|
"cors": "^2.8.5",
|
|
"dotenv": "^17.2.3",
|
|
"express": "^4.18.2",
|
|
"express-rate-limit": "^7.1.5",
|
|
"helmet": "^7.1.0",
|
|
"ioredis": "^5.3.2",
|
|
"opossum": "^9.0.0",
|
|
"prom-client": "^15.1.3",
|
|
"rate-limit-redis": "^4.3.1",
|
|
"zod": "^3.22.4"
|
|
},
|
|
"devDependencies": {
|
|
"@goodgo/eslint-config": "workspace:*",
|
|
"@goodgo/tsconfig": "workspace:*",
|
|
"@types/cors": "^2.8.17",
|
|
"@types/dotenv": "^8.2.3",
|
|
"@types/express": "^4.17.21",
|
|
"@types/ioredis": "^5.0.0",
|
|
"@types/jest": "^29.5.11",
|
|
"@types/node": "^20.11.0",
|
|
"@types/opossum": "^8.1.9",
|
|
"jest": "^29.7.0",
|
|
"prisma": "^5.9.1",
|
|
"ts-jest": "^29.1.2",
|
|
"tsx": "^4.7.1",
|
|
"typescript": "^5.3.3"
|
|
}
|
|
}
|