bgizaa / addressbook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ADDRESS BOOK

Get Started

install node_modules

  1. npm install

create file for required environment variables
2. touch .env

  • Add database connection variables in .env file

Example of .env file
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_DB=postgres
POSTGRES_PASSWORD=root

run project
3. npm run start:dev

API's

  • GET /contacts - List all contacts
  • GET /contacts/:phoneNumber - Search contact by Phone Number
  • GET /contacts/:firstName - Search contact by First Name
  • POST /contacts - Create new contact
"phoneNumber": "250782292968",
"firstName": "ope",
"lastName": "Ayuna",
"emailAddress": "ayuna@gmail.com"
  • DELETE /contacts/:phoneNumber - Delete contact
  • PATCH /contacts/:phoneNumber - Update contact
"phoneNumber": "250782292968",
"firstName": "Rose",
"lastName": "Ayuna",
"emailAddress": "ayuna@gmail.com"

About


Languages

Language:TypeScript 79.4%Language:JavaScript 20.6%