This is the backend for the form submission app. It is a Node.js app that uses Express.js and MongoDB.
- Clone the repository
git clone <repo-url>
- Install the dependencies
npm install
- Create a
.env
file in the root directory and add the following environment variables
MONGODB_URI=<mongodb-connection-string>
DB_NAME=<database-name>
DB_COLLECTION=<collection-name>
- Start the server
npm start
This endpoint is used to submit the form data.
{
"name": "Saurav Hathi",
"phoneNumber": "+912345289678",
"email": "xyz@gmail.com",
"message": "Hello World"
}
{
"message": "Successfully submitted"
}