Skip to content

dmitry-skrypka/nodejs-chat-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS chat rest API

NodeJS chat rest API

  1. Make sure mongo instance is running // mongodb://localhost:27017/chat
  2. npm i
  3. npm 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

POSTMAN COLLECTION

About

NodeJs chat rest API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published