Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 551 Bytes

README.md

File metadata and controls

34 lines (26 loc) · 551 Bytes

阿里云MQS nodejs SDK

install

npm install aliyun_mqs

demo

var MQSClient = require('aliyun_mqs');

var client = new MQSClient({
    accessKeyId: 'you accessKeyId',
    accessKeySecret: 'you accessKeySecret',
    url: 'http://{you}.aliyuncs.com'
});

//创建队列
client.queue.create('test', {}, function(err, url){
    if(!err){
        //发消息
        client.message.send('test', {
            msg: 'test'
        }, function(err, data){
            console.log(data);
        });
    }
});