Welcome to my first MERN (MongoDB, Express.js, React.js, Node.js) full-stack application!
In this project, I have built a simple Todo application where users can add, edit, and delete tasks. The frontend is built using React.js, and the backend is powered by Node.js and Express.js, with MongoDB as the database.
- Add new todos
- Edit existing todos
- Delete todos
- Fetch todos using SWR (React Hooks for data fetching)
- Simple and intuitive user interface
- MongoDB: A NoSQL database used for storing todo data.
- Express.js: A web application framework for Node.js used for building the backend REST API.
- React.js: A JavaScript library used for building the user interface.
- Node.js: A JavaScript runtime used for building the backend server.
- SWR: React Hooks library for data fetching.
- Axios: A promise-based HTTP client for making requests to the backend API.
-
Clone this repository to your local machine.
-
Navigate to the project directory.
-
Install dependencies by running:
npm install
-
Navigate to the
backend
directory:cd backend
-
Set up your MongoDB connection string in a
.env
file at the root of your project. Example:MONGODB_URI=mongodb://localhost:27017/mydatabase
-
Install backend dependencies:
npm install
-
Start the backend server:
npm start
-
Navigate to the
frontend
directory:cd frontend
-
Install frontend dependencies:
npm install
-
Start the frontend development server:
npm run dev
-
Open your web browser and navigate to
http://localhost:3000
to view the application.
This project is open-source, and contributions are welcome! If you find any bugs or have suggestions for improvements, please feel free to open an issue or submit a pull request.
This project is licensed under the ISC License. See the LICENSE file for details.