![Código JavaScript en Node.js para enviar un email:
import { Resend } from 'resend'
const { RESEND_API_KEY } = process.env
const resend = new Resend(RESEND_API_KEY)
const { data } = await resend.emails.send({
from: "Miguel Ángel <hi@midu.dev>",
to: ["name@user.com"],
subject: "¡Bienvenido a midudev!",
html: "<strong>¡Funciona!</strong>"
})](https://pbs.twimg.com/media/GlNStImXwAAjwY3.jpg?name=small&format=webp)
ALT Código JavaScript en Node.js para enviar un email: import { Resend } from 'resend' const { RESEND_API_KEY } = process.env const resend = new Resend(RESEND_API_KEY) const { data } = await resend.emails.send({ from: "Miguel Ángel <[email protected]>", to: ["[email protected]"], subject: "¡Bienvenido a midudev!", html: "<strong>¡Funciona!</strong>" })

ALT Código de JavaScript para demostrar cómo trabajar con fechas y traducciones sin dependencias: const format = (date, locale, options) => new Intl.DateTimeFormat(locale, options).format(date) const now = new Date() format(now, 'es') // -> '15/2/2024' format(now, 'en') // -> '2/15/2024' format(now, 'es', { dateStyle: 'long' }) // -> '15 de febrero de 2024' format(now, 'ja', { dateStyle: 'long' }) // -> '2024年2月15日' format(now, 'en', { weekday: 'short', day: 'numeric' }) // -> '15 Thu'




















