express-project-builder 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -316,3 +316,19 @@ import { bigIntSerializer } from "./app/middlewares/bigIntSerializer";
|
|
|
316
316
|
// Apply globally to all routes
|
|
317
317
|
app.use(bigIntSerializer);
|
|
318
318
|
```
|
|
319
|
+
|
|
320
|
+
- /src/middlewares/**formDataToSetJSONformatData.ts**
|
|
321
|
+
Middleware for converting form data to JSON format. This middleware parses form data (typically from multipart/form-data requests) and converts it to a JSON object (`req.body`), making it easier to process in your route handlers.
|
|
322
|
+
|
|
323
|
+
```typescript
|
|
324
|
+
// In your route file
|
|
325
|
+
import formDataToSetJSONformatData from "../../middlewares/formDataToSetJSONformatData";
|
|
326
|
+
|
|
327
|
+
// Apply to routes that handle both file uploads and JSON data
|
|
328
|
+
router.post(
|
|
329
|
+
"/create",
|
|
330
|
+
handleFileUpload([{...}]), // First handle file uploads
|
|
331
|
+
formDataToSetJSONformatData, // Then convert form data to JSON
|
|
332
|
+
ProductControllers.createProduct // Finally process the request
|
|
333
|
+
);
|
|
334
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express-project-builder",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "A powerful and professional Express.js project generator CLI that instantly scaffolds a production-ready backend with TypeScript, modular architecture, and built-in support for MongoDB (Mongoose) or PostgreSQL (Prisma). Includes authentication, error handling, rate limiting, file upload, caching, and utility functions—so you can focus on building features instead of boilerplate. Perfect for kickstarting your next Express.js API project with best practices and modern tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/bin/index.js",
|