Frontend README
This project demonstrates the integration of a ReactJS frontend with backend APIs for managing user data.
https://react-js-integration-with-frontend-backend.vercel.app
- Displaying user data fetched from the backend API.
- Adding new entries to the user data through the frontend interface.
- Updating existing user data using the provided form.
- Displaying counts of add and update operations.
- ReactJS
- Axios for HTTP requests
- React Router for navigation
- Clone the repository to your local machine:
git clone https://github.com/Preetiraj3697/ReactJS-Integration-with-Backend.git
- Navigate to the frontend directory:
cd client
- Install dependencies:
npm install
- Start the development server:
npm start
- Open your browser and visit http://localhost:3000 to view the application.
- Navigate between different pages using the navigation links.
- Use the "AddEntry" page to add new entries to the user data.
- Use the "Home" page to view the existing user data and update entries if needed.
The application is designed to be responsive on various devices:
- Mobile
- Tablet
- Desktop
Backend README
This project provides an ExpressJS backend API for managing user data.
https://react-js-integration-with-backend-yaf6.vercel.app/api/entries
- API endpoints for adding new entries and updating existing entries in the user data.
- API endpoint for fetching the count of add and update operations.
- MongoDB database integration for storing user data.
- ExpressJS
- MongoDB
- Mongoose for MongoDB integration
- cors
- nodemon
- Clone the repository to your local machine:
git clone https://github.com/Preetiraj3697/ReactJS-Integration-with-Backend.git
- Navigate to the backend directory:
cd server
- Install dependencies:
npm install
-
Set up your MongoDB database and update the connection URL in app.js if needed.
-
Start the server:
npm start
- The server will start running on http://localhost:3000.
- POST /api/entries/add: Add a new entry to the user data.
- POST /api/entries/update/:id: Update an existing entry in the user data.
- GET /api/entries: Get the user data.
- GET /api/entries/count: Get the count of add and update operations.
- Delete /api/entries/:id: Delete the user data from existing user Data.
- Send HTTP requests to the appropriate endpoints to add or update user data.
- Use the provided count endpoint to monitor the number of add and update operations.
Feel free to reach out if you have any questions or need further assistance!