Full-stack app. Built with Next.js, Node.js and MongoDB (REST API)
- NextJS
- ReactJS
- NodeJS
- MongoDB
- HTML
- SCSS
https://create-text-notes.herokuapp.com
- Path: /api/notes
- Method: POST
- Request body example (JSON):
{
"title": "new note",
"description": "some text"
}
title - required, unique, max length: 30
description: max length: 250
-
Response (successful):
status code: 201
response body example:
{
"success": true,
"data": {
"title": "new note",
"description": "some text",
"_id": "61f864fb08c6bd299e6f382e"
}
}
- Path: /api/notes/{note_id}
- Method: PUT
- Request body example (JSON):
{
"title": "new note",
"description": "some text"
}
title - required, unique, max length: 30
description: max length: 250
- Response (successful):
status code: 201
response body example:
{
"success": true,
"data": {
"title": "new note",
"description": "some text",
"_id": "61f864fb08c6bd299e6f382e"
}
}
-
Path: /api/notes/{note_id}
-
Method: GET
-
Response (successful):
status code: 200
response body example:
{
"success": true,
"data": {
"title": "new note",
"description": "some text",
"_id": "61f864fb08c6bd299e6f382e"
}
}
-
Path: /api/notes
-
Method: GET
-
Optional query params example:
/notes?page=3&size=5
(default: page = 1, size = 10) -
Response (successful):
status code: 200
response body example:
{
"success": true,
"data": {
"notes": [
{
"_id": "61f864fb08c6bd299e6f382e",
"title": "qwerty",
"description": "hello"
},
{
"_id": "61f86aed83f5f570cd3911ad",
"title": "test",
"description": "12345"
}
],
"totalCount": 2
}
}
-
Path: /api/notes/{note_id}
-
Method: DELETE
-
Response (successful):
status code: 200
response body example:
{
"success": true,
"data": {}
}