This is a TodoList website built using the MERN stack (MongoDB, Express, React, Node.js), with Redis for caching data and ElasticSearch for searching todos.
- Client:
http://localhost:5173/
- Server:
http://localhost:8000/
Make sure you have the following installed before running the project:
- Node.js
- MongoDB
- Redis Server
- ElasticSearch
- Clone the repository:
git clone https://github.com/Muhsin-42/To-Do.git
- Change to the project directory:
cd <project-directory>
- Install server dependencies:
npm install
in the root directory. - Create a
.env
file in the root directory and add the following environment variables:MONGODB_URI
: MongoDB connection URLPORT
: Port on which the server will runCLOUD_ID
: ElasticSearch cloud IDELASTIC_USERNAME
: ElasticSearch usernameELASTIC_PASSWORD
: ElasticSearch password
- Start the server:
npm run dev
- Change to the client directory:
cd client
- Install client dependencies:
npm install
- Create a
.env
file in the client directory and add the following environment variable:VITE_SERVER_BASE_URL
: Base URL of the server (e.g.,http://localhost:8000
)
- Start the client:
npm run dev
- Start the Redis server.
- Run the server as per the instructions above.
- Run the client as per the instructions above.
The TodoList website offers the following features:
- Add a todo
- Delete a todo
- Search todos
The following APIs are available:
POST /
: Add a new todoGET /
: Get all todosDELETE /:id
: Delete a todo by IDGET /search/:query?
: Search todos with an optional query parameter
Contributions are welcome! If you find any issues or want to add new features, please submit a pull request.
If you have any questions or suggestions, please feel free to reach out to us at [email protected].