addressbook-rest
v2.0.7
Published
A simple array based REST service for address book apps
Downloads
10
Maintainers
Readme
A simple array based REST service for address book apps
Installing:
Using:
Create a file server.js under the project folder (along side package.json)
Simplest code to start the REST service at port 8080 with a base url "/api/":
Customization of port and base url prefix:
Accessing:
Visit http://localhost:9999/api/contacts using a browser (or a REST client)
- GET http://localhost:9999/api/contacts --> all contacts
- GET http://localhost:9999/api/contacts/3 --> specific contact by id
- POST http://localhost:9999/api/contacts --> add a new contact sent via payload
- PUT http://localhost:9999/api/contacts/3 --> updates contact with id 3, data sent as payload
- DELETE http://localhost:9999/api/contacts/3 --> deletes contact with id 3