REST API NodeJS MySQL DB

⭐ Star me on GitHub — Your appreciation makes us grow and glow up! ⭐

Overview ☮️

To build a REST API using NodeJS to handle customer data and store it in an SQL database

Description into 🕊️

To create a POST API that accepts JSON input for first name, last name, email, mobile number (with country code), address, and pin code. Implement validation for email, mobile number, and pin code. Upon receiving a valid request, store the data in a SQL database using a stored procedure, with a table named "Customer Details". The table will include f ields for a unique Customer ID (auto-generated), first name, last name, email, mobile number, address, and pin code. The API will return a success response on successful insertion or a failure response if validation fails or the insertion is unsuccessful.

How we built it!?🧠

I used Express.js in the frontend. And have used MySQL for database configuration and to hit the API used Postman platform.

* POST API that allows customers to register their personal information.
* API will validate the input data and securely store the customer details in a SQL database.
* Created API Response Handling.

Prerequisites 📑

Install Node JS

Refer to https://nodejs.org/en/ to install nodejs

Install Postman

Refer to https://nodejs.org/en/ to install postman

Install MySQL DB

Refer to https://www.mysql.com/downloads/ to install mysql

Cloning and Running the Application in local 💻

Clone the project in localhost

git clone https://github.com/Dushyant029/RESTAPI-NodeJS-MySQLDB.git

Install all the npm packages. Go into the project folder and type the following command to install all npm packages

npm install

In order to run the application Type the following command

npm start

''' The Application Runs on localhost:3000

Technologies we used 🛠️

* NPM
* EXPRESSJS
* POSTMAN
* MYSQL

Screenshots 📸

Code Code

Frontend FND

Postman Fetch API

Database DB