feat: implement deployment workflow and configure PM2 for backend and frontend applications

This commit is contained in:
2025-06-09 13:13:37 -03:00
parent d57afe93a3
commit 89322f6b9e
4 changed files with 90 additions and 2 deletions

View File

@@ -8,7 +8,6 @@ export default function Contact() {
const t = useTranslations('contact');
const [formData, setFormData] = useState<{ name: string; email: string; message: string }>({ name: '', email: '', message: '' });
const [isSubmitting, setIsSubmitting] = useState(false);
const backendUrl = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:3001';
const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
setFormData({...formData, [e.target.name]: e.target.value });
@@ -31,7 +30,7 @@ export default function Contact() {
const submissionPromise = async () => {
try {
const response = await fetch(`${backendUrl}/api/email/send`, {
const response = await fetch(`/api/email/send`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(formData),