A simple Notes API built with Express.js that supports CRUD operations.
- Create new notes
- Read all notes or a single note by ID
- Update existing notes
- Delete notes
- In-memory storage
- Install dependencies:
npm install
- Start the server:
npm start
- For development with auto-reload:
npm run dev
GET /notes
- Get all notesGET /notes/:id
- Get a single notePOST /notes
- Create a new notePUT /notes/:id
- Update a noteDELETE /notes/:id
- Delete a note
Access the interactive API documentation using Scalar UI at:
http://localhost:3000/api-reference
The documentation provides:
- Interactive API explorer
- Request/response examples
- Schema validation
- Try-it-out functionality for testing endpoints
Create a new note:
curl -X POST http://localhost:3000/notes \
-H "Content-Type: application/json" \
-d '{"title": "My Note", "content": "This is a note"}'