Express server
A persistent server organizes a health endpoint and contact route with CORS middleware.
- Contact request
- Express route
- Required-field checks
- SMTP transport
- JSON response
Portfolio Contact — API Architecture
Source studyBoth implementations are available as source. Email delivery is not demonstrated here.

Two approaches to a portfolio contact flow: an Express server and a focused serverless handler.
This source study compares an Express contact API with a Vercel-oriented serverless handler. Both accept contact details, validate required fields, configure CORS, and use Nodemailer with environment-based SMTP settings.
Accept the contact name, email, subject, and message as JSON.
Check required fields and return clear success or error responses.
Configure a Nodemailer transport through environment variables.
A persistent server organizes a health endpoint and contact route with CORS middleware.
A single exported function handles method checks, preflight responses, validation, and delivery.
Actual project screens. Select one to explore the details.
A paired source study covering request handling, validation, CORS, and environment-based email configuration.