Files
order-service/package.json
T
andwati 95c24b9925 feat: initialize Express application with middleware and routes
- Set up Express application in src/app.ts with CORS, JSON parsing, and logging.
- Implement health check route.
- Add authentication, product, and order routes.
- Create error handling middleware for centralized error management.

feat: add authentication middleware with placeholder endpoints

- Implement /register and /login routes in src/middleware/auth.middleware.ts with 501 status responses.

feat: create error handling middleware

- Add error handling middleware in src/middleware/error.middleware.ts to manage errors and send appropriate responses.

feat: implement server startup logic

- Create server entry point in src/server.ts to connect to the database and start the Express server.

feat: add JWT utility functions for token signing and verification

- Implement JWT signing and verification functions in src/utils/jwt.ts with payload interface for user roles.
2026-01-12 23:24:43 +03:00

47 lines
1.2 KiB
JSON

{
"name": "order-service",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "index.js",
"scripts": {
"start": "node dist/server.js",
"dev": "ts-node-dev --respawn --transpile-only src/server.ts",
"build": "tsc",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"prettier": "prettier --check .",
"prettier:fix": "prettier --write ."
},
"keywords": [],
"author": "",
"license": "ISC",
"packageManager": "[email protected]",
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^17.2.3",
"express": "^5.2.1",
"express-rate-limit": "^8.2.1",
"mongoose": "^9.1.3",
"morgan": "^1.10.1"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"@eslint/json": "^0.14.0",
"@eslint/markdown": "^7.5.1",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.6",
"@types/jsonwebtoken": "^9.0.10",
"@types/morgan": "^1.9.10",
"@types/node": "^25.0.6",
"eslint": "^9.39.2",
"globals": "^17.0.0",
"jsonwebtoken": "^9.0.3",
"nodemon": "^3.1.11",
"prettier": "^3.7.4",
"ts-node": "^10.9.2",
"typescript": "^5.9.3",
"typescript-eslint": "^8.52.0"
}
}