A simple Note Keeping REST API built with Node.js, Express.js, and MongoDB. It allows users to perform CRUD operations on notes with support for search and pagination.
src/
├── routes/
│ └── notes.js
├── controllers/
│ └── noteController.js
├── models/
│ └── Note.js
├── config/
│ └── database.js
├── middleware/
│ └── errorHandler.js
└── app.js
-
Create, Read, Update, and Delete notes
-
Each note contains:
titlecontentcreatedAt(auto-generated)
-
Search notes by title or content
-
Pagination support for listing notes
-
Error handling with descriptive messages
GET /notes→ Get all notes (supports pagination)POST /notes→ Create a new notePUT /notes/:id→ Update a noteDELETE /notes/:id→ Delete a noteGET /notes/search?query=keyword→ Search notes
Full request/response examples are available in the Postman collection below.
You can test all endpoints easily using the provided Postman collection:
👉 Download Note Keeper API Postman Collection
(Save the exported Postman collection JSON in your /docs folder)
git clone https://github.com/MayarQasrawi/note-keeper-api.git
cd note-keeper-apinpm installCreate a .env file:
PORT=3000
MONGO_URI=your_mongodb_connection_string
npm startAPI runs at 👉 http://localhost:3000
- Node.js
- Express.js
- MongoDB + Mongoose
- Full-text search on notes (
title&content) - Paginated notes listing
MIT License © 2025 Mayar Qasrawi