Simple contact management running in local memory.
A contact
looks like this:
[
{
"firstName": "Bilbo",
"lastName": "Baggins",
"age": 111,
"photo": "http://vignette1.wikia.nocookie.net/lotr/images/6/68/Bilbo_baggins.jpg/revision/latest?cb=20130202022550",
"other": {}
}
]
- View all contacts
- View a contact
- Create new contact
- Edit a contact
- Delete a contact
- Delete all contacts
To install you need to have node version 6.x.x in your system.
Then just run:
npm install
npm start
it will run on port 3000 by default, or you can specify your port of choice
by specifying PORT
in your environment variables.
These are following API available
- GET /contact/list
- GET /contact/{firstname}
- POST /contact
- PUT /contact/{firstname}
- DELETE /contact/{firstname}
- DELETE /contact
You can check out the complete Swagger-API documentation at [http://localhost:3000/#/Contacts] (http://localhost:3000/#/Contacts).
npm test
for running unit test
npm run coverage
for generating code coverage, it will generate them in <root_directory>/coverage