A simple CRUD application built with Node.js, Express, and EJS to practice handling forms, file system operations, and server-side routing.
- Create Tasks: Save task details as
.txtfiles in the backend. - Read Tasks: View a list of all saved tasks on the dashboard.
- View Details: Read the full content of individual task files.
- Edit Tasks: Rename existing task files.
- Delete Tasks: Remove task files with a confirmation success page.
- Backend: Node.js, Express.js
- Templating: EJS
- Styling: Tailwind CSS
- Storage: Local File System (
fsmodule)
.
├── files/ # Directory where tasks are saved as .txt
├── public/ # Static assets
├── views/ # EJS templates
│ ├── index.ejs # Dashboard
│ ├── show.ejs # Individual task view
│ ├── edit.ejs # Rename file form
│ └── delete.ejs # Success message view
├── index.js # server & routes
└── package.json # Project dependencies
## Key Learnings
-Asynchronous Flow: Handling fs.readdir and fs.readFile using callbacks.
-EJS Integration: Passing data from Express routes to the frontend.
-HTTP Methods: Difference between GET and POST for creating and deleting data.