mirror of
https://github.com/andwati/order-service.git
synced 2026-11-05 10:22:16 +00:00
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.
This commit is contained in:
+8
-1
@@ -18,18 +18,25 @@
|
||||
"license": "ISC",
|
||||
"packageManager": "[email protected]",
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^17.2.3",
|
||||
"express": "^5.2.1",
|
||||
"mongoose": "^9.1.3"
|
||||
"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",
|
||||
|
||||
Reference in New Issue
Block a user