makeomatic / mservice-chat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MService Chat

npm version Build Status codecov

Docker image

API requests

API documentation. See mservice for more details about making requests. Some examples:

  • HTTP
curl -H "Content-Type: application/json" -X POST -d '{"foo":"bar"}' http://localhost:3000/api/chat/rooms/list
  • socket.io
socketClient.emit('api.chat.rooms.join', { id: '<roomId>'}, callback)

Auth

  • HTTP Add token to request params
curl -H "Content-Type: application/json" -X POST -d '{"token":"user-token"}' http://localhost:3000/api/chat/rooms/list
  • socket.io
const client = socketIOClient('http://0.0.0.0:3000', { query: 'token=user-token' });

About


Languages

Language:JavaScript 99.4%Language:Shell 0.3%Language:Dockerfile 0.3%