The Contact API is a backend server that enables visitors to send emails through a contact form on my portfolio website. It uses Node.js, Express, and Nodemailer. The API handles the contact form submissions and forwards the emails to my Gmail account.
- Simple contact form to collect name, email, subject, and message.
- Forwarding of contact information emails to my Gmail account.
To run the Contact API, you need the following software installed on your machine:
- Node.js (version 14 or later)
- npm (Node Package Manager)
-
Clone the repository to your local machine:
git clone https://github.com/your_username/contact-api.git
-
Navigate to the project directory:
cd contact-api
-
Install the dependencies:
npm install
-
Configure the Email Account:
- Create
.env
file, - Save the email credentials and app-specific password in .env with your Gmail account details.
- Create
-
Start the server:
npm start
- The API server will be running at http://localhost:8000.
- Practiced designing RESTful APIs with Express.
- Gained experience with form validation and error handling.
- Learned how to structure backend projects for scalability.
Contributions to this project are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
MIT License – free to use and adapt.