Skip to content

Latest commit

 

History

37 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NoteKeeper REST API

Description:

The NoteKeeper REST API, powered by the Express framework, is a tool for managing CRUD operations for a notes application. This API provides developers with routes to create, read, update, and delete notes.

Key Features:

  • CRUD Operations: Perform Create, Read, Update, and Delete operations on notes with ease.
  • Scalable Architecture: Built on RESTful principles, the API boasts a scalable architecture, capable of handling large volumes of requests without compromising performance.

Technologies Used:

  • Node.js: Leveraging the efficiency and versatility of Node.js for building scalable server-side applications.
  • Express.js: Utilizing the lightweight and flexible Express framework to simplify routing, middleware integration, and request handling, speeding up development time.

Usage:

Follow these steps to run server and use API in local:

## Clone the repository to your local machine.
git clone <git_repo_url>

## Move to project repo
cd <folder_path>

## Install dependencies using npm.
npm install

## Start the server using Node.js.
npm run dev:watch

API:

GET

PATH

/notes

RESPONSE

All notes

status: 200 OK | 404 Not Found
{
  "notes": [
    {
      "id": "0WaR1-1714233765588",
      "name": "Walk the dog",
      "description": "Go to the park",
      "important": false,
      "status": "pending",
      "due_date": "4/27/2024",
      "created_at": 1714233765597
    }
  ]
}

POST

PATH

/notes

REQUEST

const newNote = {
  name: string,
  description: string,
  important: boolean,
  status: string("pending" | "in progress" | "done"),
  dueDate: string("dd/mm/yyyy"),
};

RESPONSE

Created note

status: 201 Created | 400 Bad Request
{
  "id": "abcde-1714234679010",
  "name": "Wash dishes",
  "description": "Washing machine is out of order",
  "important": true,
  "status": "pending",
  "dueDate": "1/6/2024",
  "created_at": 1714234679010
}

PUT

PATH

/notes/:id

REQUEST

const updatedNote {
  name: string |
  description: string |
  important: boolean |
  status: string ("pending" | "in progress" | "done") |
  dueDate: string ("dd/mm/yyyy")
}

RESPONSE

Updated note

status: 200 OK | 400 Bad Request
{
  "id": "abcde-1714234679010",
  "name": "Wash dishes",
  "description": "Washing machine is out of order",
  "important": true,
  "status": "pending",
  "dueDate": "1/6/2024",
  "created_at": 1714234679010
}
{
  "error": "Note with id abcde-1714234679010 does not exist"
}

DELETE

PATH

/notes/:id

RESPONSE

Deleted note

status: 200 OK | 404 Not Found
{
  "id": "abcde-1714234679010",
  "name": "Wash dishes",
  "description": "Washing machine is out of order",
  "important": true,
  "status": "pending",
  "dueDate": "1/6/2024",
  "created_at": 1714234679010
}
{
  "error": "Note with id abcde-1714234679010 does not exist"
}

License:

This project is licensed under the MIT License, granting users the freedom to use, modify, and distribute the software as they see fit. See the LICENSE file in the repository for more details.


SonarCloud

Quality Gate Status


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages