NodeJS chat rest API
- Make sure mongo instance is running //
mongodb://localhost:27017/chat npm inpm start(default port is 7777)
Routes:
1.Users:
1.1 GET http://localhost:7777/api/users/ to get all users
1.2 GET http://localhost:7777/api/users/:id to get user with id
1.3 POST http://localhost:7777/api/users/ to create user
1.4 PUT http://localhost:7777/api/users/:id to update user with :id
1.5 DELETE http://localhost:7777/api/users/:id to delete user with :id
2.Messages
2.1 GET http://localhost:7777/api/messages/ to get all messages
2.2 GET http://localhost:7777/api/messages/:_id to get message with :_id
2.3 POST http://localhost:7777/api/messages/ to create message
2.4 PUT http://localhost:7777/api/messages/:_id to update message with :_id
2.5 DELETE http://localhost:7777/api/messages/:_id to delete certain message
3.Contacts
3.1 GET http://localhost:7777/api/contacts/:id to retrieve contact list for user with :id