Skip to content

kumaradarsh2/my-note-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Notes App Backend

A simple REST API for managing notes using Node.js, Express, and MongoDB.

Setup

  1. Install dependencies:
npm install
  1. Create .env file:
MONGODB_URI=your_mongodb_connection_string
PORT=3000
  1. Start the server:
npm start

API Endpoints

Method URL Description
GET /api/notes Get all notes
POST /api/notes Create a note
PUT /api/notes/:id Update a note
DELETE /api/notes/:id Delete a note

Example Usage

Create a note:

POST /api/notes
{
  "title": "My Note",
  "content": "Note content here"
}

Get all notes:

GET /api/notes

Project Structure

src/
β”œβ”€β”€ config/          # Database connection
β”œβ”€β”€ controllers/     # Business logic
β”œβ”€β”€ middleware/      # Rate limiting
β”œβ”€β”€ models/          # Data models
β”œβ”€β”€ routes/          # API routes
└── server.js        # Main server file

Technologies

  • Node.js
  • Express.js
  • MongoDB Atlas
  • Postman (for testing)

About

A simple REST API for managing notes using Node.js, Express, and MongoDB.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published