express-project-builder 1.0.22 → 1.0.23
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 +23 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -701,3 +701,26 @@ await removeFilesFromFields(req.files, ["images", "documents"]);
|
|
|
701
701
|
// Clean entire upload directory
|
|
702
702
|
await cleanUploadDirectory("/path/to/uploads");
|
|
703
703
|
```
|
|
704
|
+
|
|
705
|
+
- /src/utils/**sendEmail.ts** <br/>
|
|
706
|
+
Utility functions for sending emails using Nodemailer with HTML content, attachments, and error handling.
|
|
707
|
+
|
|
708
|
+
```typescript
|
|
709
|
+
// In your service file or any file
|
|
710
|
+
import sendEmail, { testEmailConfig } from "../../utils/sendEmail";
|
|
711
|
+
import { TEmailFormat } from "../../interfaces/emailFormat";
|
|
712
|
+
|
|
713
|
+
// Send email with HTML content
|
|
714
|
+
const emailTemplate: TEmailFormat = {
|
|
715
|
+
subject: "Welcome to Our Platform",
|
|
716
|
+
emailBody: `
|
|
717
|
+
<h1>Welcome!</h1>
|
|
718
|
+
<p>Thank you for joining our platform.</p>
|
|
719
|
+
`,
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
await sendEmail(payload.email, emailTemplate);
|
|
723
|
+
|
|
724
|
+
// Test email configuration
|
|
725
|
+
await testEmailConfig();
|
|
726
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express-project-builder",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
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",
|