This is the backend server for a note-taking application. It provides a REST API to manage user accounts and notes.
Clone the repository:
git clone https://github.com/BalaGoChainDev/NoteTakingApplication.gitNavigate to the project directory:
cd NoteTakingApplicationTo start the application
make runThe following are the API endpoints provided by the Note Taking Application Backend:
Endpoint: POST /signup
Request Payload:
{
"name": "John Doe",
"email": "john@example.com",
"password": "password123"
}Response:
- 200 OK on success
- 400 Bad Request if the request format is invalid
Endpoint: POST /login
Request Payload:
{
"email": "john@example.com",
"password": "password123"
}Response:
- 200 OK with the session ID (sid) on successful login
- 400 Bad Request if the request format is invalid
- 401 Unauthorized if the username and password don't match
Endpoint: GET /notes
Request Payload:
{
"sid": "205fd11b-b69c-4158-90e3-ca805cf04348"
}Response:
- 200 OK with the list of notes on success
- 400 Bad Request if the request format is invalid
- 401 Unauthorized if the session ID is invalid
Endpoint: POST /notes
Request Payload:
{
"sid": "3d89babf-c8cc-4a79-9c81-b92ac301c9b3",
"note": "SampleNote"
}Response:
- 200 OK with the ID (id) of the newly created note
- 400 Bad Request if the request format is invalid
- 401 Unauthorized if the session ID is invalid
Endpoint: DELETE /notes
Request Payload:
{
"sid": "3d89babf-c8cc-4a79-9c81-b92ac301c9b3",
"id":"1"
}Response:
- 200 OK on success
- 400 Bad Request if the request format is invalid
- 401 Unauthorized if the session ID is invalid