This is the backend part of chat-rooms web application.
- Project entrypoint
- Server setup (middlewares,routes,connect to db)
- index
- development
- production
- auth router:
- /api/auth/is-auth (get)
- /api/auth/join (post)
- /api/auth/leave (post)
- user router:
- /api/user/add (post)
- /api/user/update (put)
- chat-rooms router:
- /api/chat-room/create (post)
- /api/chat-room/destroy (delete)
- messages router
- /api/messages/get-messages/:list (get)
- api/messages/get-private-messages/:userId/:list (get)
- auth controller:
- getUserInfo
- join
- leave
- chat-room controller
- createRoom
- deleteRoom
- messages controller
- saveMessage
- getMessages
- getPrivateMessages
- user controller
- addUser
- updateUser
- error
- errorHandler
- asyncErrorHandler
- protect
- protect
- user
- checkUserExist
- cloudinary
- saveAvatar
- multer
- token
- signToken
- verifyToken
- cookie
- index
- socket.middleware
- socket.room-handler
- socket.private-handler
- socket.room-utils
- socket.redis-adapter
- logger
- mongo.database
- chat-room
- message
- user