Skip to content

Commit

Permalink
Merge pull request #95 from UjjwalSaini07/Release5Pushments
Browse files Browse the repository at this point in the history
Pushments Before Release5
  • Loading branch information
UjjwalSaini07 authored Nov 1, 2024
2 parents 6b917ab + 46d807c commit 03ce536
Show file tree
Hide file tree
Showing 11 changed files with 196 additions and 2,014 deletions.
2 changes: 1 addition & 1 deletion Backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backend",
"version": "1.0.0",
"version": "0.1.3",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
69 changes: 1 addition & 68 deletions Backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const express = require('express');
const nodemailer = require('nodemailer');
const cors = require('cors');
const bodyParser = require('body-parser');
const axios = require('axios'); // Import axios for external requests
const axios = require('axios');
require("dotenv").config();

const app = express();
Expand Down Expand Up @@ -89,70 +89,3 @@ app.listen(PORT, () => {
});

module.exports = app;


// Todo: Code without Google API - Previous Vercel Prod
// const express = require('express');
// const nodemailer = require('nodemailer');
// const cors = require('cors');
// const bodyParser = require('body-parser');
// require("dotenv").config()

// const app = express();
// const PORT = 5000; // You can change the port if needed

// app.use(cors());
// app.use(bodyParser.json());

// // Set up Nodemailer transporter
// const transporter = nodemailer.createTransport({
// service: 'gmail', // You can use another service like SendGrid or SMTP
// auth: {
// user: process.env.EMAIL_USER,
// pass: process.env.EMAIL_PASS,
// },
// });

// // GET route for /send-email to avoid "Cannot GET" error in the browser
// app.get('/send-email', (req, res) => {
// res.send('Email API is running. Use POST /send-email to send an email.');
// });

// // Email sending endpoint
// app.post('/send-email', (req, res) => {
// const { email } = req.body;

// if (!email) {
// return res.status(400).json({ success: false, message: 'Email is required' });
// }

// const mailOptions = {
// from: '[email protected]', // Your email
// to: email,
// subject: 'Congratulations! You’ve Successfully Subscribed to Daily Bhagavad Gita Shlokas!',
// text: `You have successfully subscribed to daily Bhagavad Gita Shlokas! Congratulations! 🎉

// Get ready to dive deep into the profound wisdom and teachings of the Bhagavad Gita. Each day, you will receive a meaningful Shloka delivered straight to your inbox. These sacred verses will guide you on a spiritual journey, offering insights into life, duty, and inner peace.

// Enjoy the daily dose of timeless philosophy and find inspiration from the divine teachings of Lord Krishna. 🌿

// We are excited to have you with us on this path of spiritual growth!`
// };

// transporter.sendMail(mailOptions, (error, info) => {
// if (error) {
// console.error('Error sending email:', error);
// return res.status(500).json({ success: false, message: 'Failed to send email' });
// }
// console.log('Email sent:', info.response);
// res.status(200).json({ success: true, message: 'Email sent successfully!' });
// });
// });

// // Start the server
// app.listen(PORT, () => {
// console.log(`Server is running on http://localhost:${PORT}`);
// });

// export default app;

20 changes: 0 additions & 20 deletions LEARN.md

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vedicvani",
"version": "0.1.2",
"version": "0.1.5",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-free": "^6.5.2",
Expand Down
Loading

0 comments on commit 03ce536

Please sign in to comment.