I need to have multiple contact forms on a website using node.js – help please :)

I am creating a website for a restaurant where there will be multiple contact forms. I know this is probably stupid, but help without judgement would be much appreciated.
I am using node.js with express and nodemailer dependencies to send the forms. I have my main contact form in the footer working and sending perfectly – simple email, name, message inputs.
What I need is an additional form – separate page – for private event bookings/inquiries. This will be more thorough and have more fields. Some will be radio buttons to chose from a set of options, some will be text inputs.
I just need to know if I need to make a server2.js file or if I can handle both forms in one server file. I would think create a separate server file as it would be messy not to, no?
As well, in my main app.js file, I would just create a new XML variable and basically do the same thing correct?

This is my contact form html

 <section id="hm-contact">
        <div class="form-container">
            <form class="contact-form">
                <h2>CONTACT</h2>
                <input type="text" id="name" placeholder="Full Name"></br>
                <input type="email" id="email" placeholder="Email"></br>
                <input type="text" id="subject" placeholder="Subject"></br>
                <textarea id="message" placeholder="Message..."></textarea></br>
                <input type="submit" class="submit" value="Send">
            </form>
        </div>
        <div class="map">
            <img src="/img/HmMapImg.png" alt="Map with El Tres location">
        </div>
        <div class="contact-info">
            <p class="hours">Hours</p>
            <div class="weekday-hours">
                <p class="week-days">Tuesday - Thursday</p>
                <p class="week-hrs">5pm - 10pm</p>
            </div>
            <div class="weekend-hours">
                <p class="weekend-days">Friday & Saturday</p>
                <p class="frisat-hrs">5pm - 1am</p>
            </div>
            <div class="tequila-night">
                <p class="tequila-day">Half Price Tequila Fridays</p>
                <p class="tequila-hrs">9pm - 11pm</p>
            </div>
            <div class="location">
                <p class="address">269 Red River Rd.</p>
                <p class="city">Thunder Bay, ON P7B 1A9</p>
                <p class="phone">(807) 344-3443</p>
            </div>
        </div>

This is my server.js so far (of course I will be putting sensitive info in a .env file, but for dev and testing it’s here for now until launch (which speaking of .env, will I need two files or can I use one .env for both emails?)

const express = require('express');
const app = express();

const nodemailer = require('nodemailer');

const PORT = process.env.PORT || 3000;

// Middleware
app.use(express.static('public'));
app.use(express.json());

app.get('/', (req, res) => {
    res.sendFile(__dirname + '/public/index.html');
});

app.post('/', (req, res) => {
    console.log(req.body);

        const transporter = nodemailer.createTransport({
        host: 'mail.myntbranding.com',
        port: 465,
        auth: {
            user:'[email protected]',
            pass: 'password'
        }
    })

    const mailOptions = {
        from: req.body.email,
        to: 'email@email',
        subject: `Message from ${req.body.email}: ${req.body.subject}`,
        text: req.body.message
    }

    transporter.sendMail(mailOptions, (error, info) => {
        if(error){
            console.log(error);
            res.send('error');
        }else{
            console.log('Email sent:' + info.response);
            res.send('success')
        }
    });
})

app.listen(PORT, ()=>{
    console.log(`Server running on port ${PORT}`);
});

And then this is my app.js

const contactForm = document.querySelector('.contact-form');

let name = document.getElementById('name');
let email = document.getElementById('email');
let subject = document.getElementById('subject');
let message = document.getElementById('message');

contactForm.addEventListener('submit', (e) => {
    e.preventDefault();
    
    let formData = {
        name: name.value,
        email: email.value,
        subject: subject.value,
        message: message.value
    }

    let xhr = new XMLHttpRequest();
    xhr.open('POST', '/');
    xhr.setRequestHeader('content-type', 'application/json');
    xhr.onload = function(){
        console.log(xhr.responseText);
        if(xhr.responseText == 'success') {
            alert('Email Sent');
            name.value = '';
            email.value = '';
            subject.value = '';
            message.value = '';
        }else{
            alert('Something went wrong!');
        }
    }

    xhr.send(JSON.stringify(formData));

});

Thank you in advance for your help!

I haven’t tried anything yet, I want to seek out some advice and then see whatsup when I test it out. I’ve also been looking for tutorials but I can’t find anything on how to handle more than one contact form with node. Thanks y’all.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật