Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shivau1208/todo
Your Personal Todo App
https://github.com/shivau1208/todo
ajax css3 dockerfile html5 javascript mongodb python3
Last synced: 4 days ago
JSON representation
Your Personal Todo App
- Host: GitHub
- URL: https://github.com/shivau1208/todo
- Owner: shivau1208
- Created: 2022-08-12T10:46:37.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-05T18:49:57.000Z (3 months ago)
- Last Synced: 2024-08-05T21:59:14.946Z (3 months ago)
- Topics: ajax, css3, dockerfile, html5, javascript, mongodb, python3
- Language: HTML
- Homepage: https://todo-8q0w.onrender.com
- Size: 72.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Todo
#### Todo application to add daily tasks.
#### Application will work as Single page application using AJAX and JSON.
#### To clone the application use below link:
# [Todo](https://github.com/shivau1208/S-ToDo)
## Previews
![](https://github.com/shivau1208/S-ToDo/assets/102743170/ce078b10-8294-475e-8f71-97bbeffdf80d)
![](https://github.com/shivau1208/S-ToDo/assets/102743170/563d8670-d5c4-4642-99ab-880901866656)## Developement Setup
```
1. Install Python > 3.11
2. Create enviornment with python.
3. pip install -r requirement.txt
4. python run.py
```## Build Docker Image with Dockerfile
```docker build -t todo ```## Run the Container with Docker
```
docker run -p 5000:5000 --name TodoContainer todo
```## Mongo DB Connection
```
from pymongo import MongoClient# Connect to MongoDB
client = MongoClient('mongodb://localhost:27017/')# Access the database
db = client['mydatabase']# Access the collection
collection = db['mycollection']# Insert a document
collection.insert_one({"name": "Alice", "age": 30})# Find one document
document = collection.find_one({"name": "Alice"})
print("Find one:", document)# Find multiple documents
documents = collection.find({"age": {"$gt": 25}})
print("Find multiple:")
for doc in documents:
print(doc)# Update a document
collection.update_one({"name": "Alice"}, {"$set": {"age": 31}})# Update multiple fields in the document
collection.update_one(
{"name": "Alice"}, # Query to match the document
{
"$set": {
"age": 31,
"city": "New York",
"email": "[email protected]"
}
}
)# Verify the update
updated_document = collection.find_one({"name": "Alice"})
print(updated_document)# Delete a document
collection.delete_one({"name": "Alice"})```