shiva2492 / phone-book

User phone book ( With Add, Edit, Delete, List Operations )

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phonebook Rest API

Rest api for phonebook

Requirements

Getting Started

Clone the repo and make it yours:

git clone --depth 1 https://github.com/shiva2492/phone-book.git
cd phone-book

Install dependencies:

npm i

Set environment variables:

cp .env.example .env

Running Locally

npm dev

Running in Production

npm start

Lint

# lint code with ESLint
npm lint

# try to fix ESLint errors
npm lint:fix

# lint and watch for changes
npm lint:watch

Test

# run all tests with Jest and creates coverage report
npm test

# run unit tests
npm test:unit

# run integration tests
npm test:integration

# run all tests and watch for changes
npm test:watch

Logs

# show logs in production
pm2 logs

Documentation

# generate and open api documentation with sample request 
npm docs

Docker

# run container locally
yarn docker:dev

# run container in production
yarn docker:prod

# run tests
yarn docker:test

Deploy

Set your server ip:

DEPLOY_SERVER=127.0.0.1

Replace my Docker username with yours:

nano deploy.sh

Run deploy script:

yarn deploy

About

User phone book ( With Add, Edit, Delete, List Operations )


Languages

Language:JavaScript 98.6%Language:Shell 0.9%Language:Dockerfile 0.4%