noahdelaweb
Explore posts from serversVendure deployment error
If I understand correctly
If you're trying to access a website that runs on HTTP externally from HTTPS and port 443.
1. Use HTTPS: Make sure you access the website using "https://" instead of "http://". This ensures a secure connection.
2. Omit Port (if using default): If the website uses the default secure port (which is 443 for HTTPS), you don't need to explicitly mention the port in the URL. Just use "https://example.com" instead of "https://example.com:443" – the port is implied.
By following these steps, you're ensuring a secure connection (HTTPS) and letting the system automatically use the default secure port (443).
Where are you getting the 443?
7 replies
CDCloudflare Developers
•Created by noahdelaweb on 8/17/2023 in #general-help
Failed to produce a Cloudflare Pages build from the project.
it still give me the same error
16 replies
CDCloudflare Developers
•Created by noahdelaweb on 8/17/2023 in #general-help
Failed to produce a Cloudflare Pages build from the project.
like so ?
import nodemailer from "nodemailer";
import sgTransport from "nodemailer-sendgrid-transport";
const transporter = {
auth: {
// Update your SendGrid API key here
api_key: "...",
},
};
const mailer = nodemailer.createTransport(sgTransport(transporter));
// Add the config object for Edge Runtime
export const config = { runtime: 'edge' };
export default async (req, res) => {
// console.log(req.body)
const { name, email, number, subject, text } = req.body;
const data = {
// Update your email here
to: "[email protected]",
from: email,
subject: "Hi there",
text: text,
html:
<b>From:</b> ${name} <br />
<b>Number:</b> ${number} <br />
<b>Subject:</b> ${subject} <br />
<b>Message:</b> ${text}
,
};
try {
const response = await mailer.sendMail(data);
console.log(response);
res.status(200).send("Email send successfully");
} catch (error) {
console.log(error);
res.status(500).send("Error proccessing charge");
}
};16 replies