微软云技术Windows Azure专题(四):如何利用Mobile Service的计划程序连接到Service Bus定时推送消息


 

第一步:参见第一讲

 

var azure = require('azure'); var notificationHubService = azure.createNotificationHubService('****你自己的Service Bus的命名空间****', '****你自己的Service Bus的连接字符串****');

var TodoItemTable = tables.getTable('TodoItem');     TodoItemTable.read({         success: function(todoitems) {             todoitems.forEach(function(todoitem) {                 if(todoitem.complete===false)             {notificationHubService.wns.sendToastText01(null, {                     text1: todoitem.text                 }, function (error) {         if (!error) {             console.warn("Notification successful");         }         }         );}                             });         }     });


 

 

相关内容

    暂无相关文章