In the given assignment create a simple 2-Page website using Node.js and SQL database, Page 1 will have three buttons namely Fetch Users, Delete Users, and User Details, on clicking the Fetch Users button the the application should fetch data from the (https://randomuser.me/) API and store it in a table of any name in the database, the data fetch should be in bulk for e.g., if the API returns a single record then the application should be in such a way that it will fetch around 50 or 100 records on a single click.
https://cointab-assignments.netlify.app/
To run the project on your local machine, follow the steps below:
-
Clone the repository:
git clone https://github.com/himanshu60/cointab.git
-
Install Dependencies:
npm i
-
Run the backend server:
node app.js
-
Start frontend:
npm run start
The project provides the following API endpoints:
- GET /all-users: Retrieves all user data.
- GET /fetch-get-users: Retrieves user data based on the page number.
- GET /get/filter: Retrieves user data with specific filters applied.
- GET /users-pagination: Retrieves user data with pagination.
- DELETE /table-delete: Deletes the user table from the database.
This project has three main features:
- Debouncing: It reduces the number of API calls when users input data.
- Pagination: It helps users navigate through their data page by page.
- Multiple Filters: Users can apply different criteria to filter their data.