Skip to content

This is the backend for the form submission app. It is a Node.js app that uses Express.js and MongoDB.

Notifications You must be signed in to change notification settings

sauravhathi/form-submission-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Form Submission Backend

This is the backend for the form submission app. It is a Node.js app that uses Express.js and MongoDB.

Setup

  1. Clone the repository
git clone <repo-url>
  1. Install the dependencies
npm install
  1. 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>
  1. Start the server
npm start

API

POST /form

This endpoint is used to submit the form data.

Request Body

{
    "name": "Saurav Hathi",
    "phoneNumber": "+912345289678",
    "email": "[email protected]",
    "message": "Hello World"
}

Response

{
    "message": "Successfully submitted"
}

About

This is the backend for the form submission app. It is a Node.js app that uses Express.js and MongoDB.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published