This project serves as the backend API for my Google Keep Clone built with React. It provides the necessary endpoints to manage notes, enabling seamless integration with the corresponding frontend application.
- Dec 2023
Not yet deployed!
However, feel free to experiment on your local machine.
- Clone this repo
- Setup
.env
MONGODB_URI=<your mongodb uri> SECRET_KEY=<secret key for hash password>
- Run app by executing ->
npm start
- Base Url:
http://localhost:5000
- /auth/register
<method>POST
: Create a new account- request body:
{ username: "", email: "", password: "" }
- /auth/login
<method>POST
: Login to your account- request body:
{ email: "", password: "" }
-
/notes
<method>POST
: Create a new note- request body:
{ title: "Demo", // Note Title body: "Hello this is a note...", // Actual Note // Optional preferences: { bgcolor: "bg-red-800", // Tailwindcss class pin: true, // Is note pinned? } }
-
/notes
<method>GET
: Get all notes- required to send
session-token
asauthorization
header withBearer
prefix. e.g: { "authorization": "Bearer token" }
-
/notes/id
id
is your note_id<method>PATCH
: Update a specific note- required to send
session-token
asauthorization
header withBearer
prefix. e.g: { "authorization": "Bearer token" }
-
/notes/id
id
is your note_id<method>DELETE
: Delete a specific note- required to send
session-token
asauthorization
header withBearer
prefix. e.g: { "authorization": "Bearer token" }