easemob

easemob nodejs api

Usage no npm install needed!

<script type="module">
  import easemob from 'https://cdn.skypack.dev/easemob';
</script>

README

Nodejs Client for 环信/Easemob

How To Use

  • npm install easemob
  • in your code
  var easemob = require('easemob');


  Em = new easemob({
    appKey: "appKey"
    clientSecret: "clientSecret",
    clientId: "clientId",
    orgName: "orgName",
    appName: "appName",
    redis: { //use redis to save the  token, http://www.easemob.com/docs/rest/userapi/#getadmintoken
      host: "localhost",
      port: 6379
    }
  });

  Em.createUser({
    username: "somename",
    password: "password",
    nickname: "nickName"
  }, function(err, result) {
    console.log('err <<<', err);
    console.log('result <<<', result);
  })

TODO

License

MIT