Skip to content

Lzemi14/contact-manager

Repository files navigation

Contact Management API

A RESTful API for managing contacts using Node.js, Express, MongoDB, and Mongoose.

Table of Contents

Features

  • Create a new contact
  • Retrieve all contacts
  • Retrieve a single contact by ID
  • Update a contact
  • Delete a contact

Technologies Used

  • Node.js
  • Express
  • MongoDB
  • Mongoose

API Endpoints

The following endpoints are available:

-GET /api/contacts - Retrieve all contacts -POST /api/contacts - Create a new contact Required fields: name, email, phone -GET /api/contacts/ Retrieve a contact by ID -PUT /api/contacts/ Update a contact by ID -DELETE /api/contacts/ Delete a contact by ID

Example

Example usage:

  • Create a new contact:

POST /api/contacts { "name": "John Doe", "email": "[email protected]", "phone": "123-456-7890" }

  • Retrieve all contacts:

GET /api/contacts

  • Retrieve a contact by ID:

GET /api/contacts/:id

  • Update a contact by ID:

PUT /api/contacts/:id { "name": "Updated Name", "email": "[email protected]", "phone": "987-654-3210" }

  • Delete a contact by ID: DELETE /api/contacts/:id

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published