Tag: azure mobile services

Azure移动服务和socket.io

我正在尝试创build一个HTML5 / JS应用程序,并为我的后端使用Azure移动服务。 基于ScottGu的post ,他演示了源代码控制和npm模块支持,我想知道是否可以使用socket.io来启用实时通知和使用WebSocket。 我可以看到如何能够引入模块,并为每个特定的请求使用它(例如,当一个客户端POSTS资源,添加一个钩子广播资源的创build到所有客户端),但我不确定如何设置并共享socket.io对象。 NB。 我知道对iOS,Windows和Google的基于推送的通知的内置支持,但是它还没有提供基于web的项目的开箱即用解决scheme – 因此想要使用socket.io(或任何SignalR-esque等效)。

连接到Azure移动服务上托pipe的Socket.IO服务器返回错误

我尝试使用启动脚本连接到Azure移动服务的扩展文件夹中托pipe的Socket.IO服务器,但我无法这样做,并且收到错误消息: "WebSocket connection to 'ws://mymobileservice.azure-mobile.net/extensions/socket.io/?EIO=2&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 503" 我正在使用端口80与“扩展/ socket.io”的path我也用端口443与安全的连接,并已经产生了相同的错误。 我在正确的轨道上? 任何帮助是极大的赞赏。

Azure应用程序服务推送通知注册与iOS中的标签

我在本月开始使用Azure App Service,之前我使用的是Azure Mobile Services的App Service,注册设备令牌非常简单,但是在应用服务中,我意识到由于安全问题而将其删除,所以我必须使用自定义API。 我正在使用自定义身份validation(不是azure色的身份validation服务(由于我的客户端不希望它))与我的数据库,以便我需要设置用户ID作为标记发送通知给特定用户。但是,我面临的问题,即使如果设备令牌注册是好的(我可以发送推送给没有标签的每个人)标签不工作,我正在关注这些博客post https://blogs.msdn.microsoft.com/writingdata_services/2016/04/14/adding-push-notification-tags-from-a-node-js-backend/ https://blogs.msdn.microsoft.com/writingdata_services/2016/01/22/adding-push-notification-tags-from-an-azure-mobile-apps-client/ 我的自定义API(updateNotification.js) var api = { get: (request,response,next) => { var push = request.azureMobile.push; var installationId = request.query.id; push.getInstallation(installationId, function(error, installation, res){ if (error){ console.log('An error occurred when retrieving installation : ' + error); response.status(error.statusCode).send(error.detail); } else{ // Return an array of current tags. response.json(installation.tags); } }); […]

使用node.js在Azure文件存储中上传文件

我们正在尝试创build一个web服务,使用node.js服务将file upload到Azure文件存储。 以下是node.js服务器代码。 exports.post = function(request, response){ var shareName = request.headers.sharename; var dirPath = request.headers.directorypath; var fileName = request.headers.filename; var body; var length; request.on("data", function(chunk){ body += chunk; console.log("Get data"); }); request.on("end", function(){ try{ console.log("end"); var data = body; length = data.length; console.log(body); // This giving the result as undefined console.log(length); fileService.createFileFromStream(shareName, dirPath, fileName, body, […]