Tag: azure

备份在documentdb中

我需要对当前的集合进行快照,然后在documentdb中的任何时间点进行恢复。 可用的选项正在使用Azure迁移工具。 是否有可能通过我的应用程序内置节点调用API来做到这一点?

无法弄清楚如何生成和查看Bot服务上的nodeJs bot的日志

我最近将自己的nodeJs bot部署到了Bot Service,似乎无法弄清楚如何生成和查看日志。 当我尝试启用日志logging,我不断得到一个未知的错误 查看服务器上的日志文件,没有文件logging节点应用程序 试图login到应用程序的见解,没有成功。 帮帮我?

azure-functions-cli:func init spits错误“No such file or directory”

我使用以下URl安装了7.x NoodeJs, https://github.com/nodesource/distributions # Using Ubuntu curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash – sudo apt-get install -y nodejs 如链接https://blogs.msdn.microsoft.com/appserviceteam/2016/12/01/running-azure-functions-locally-with-the-cli/中所述 ,安装了azure-functions-cli, npm i -g azure-functions-cli 现在,当我运行“func init”时,出现以下错误:$ func init:没有这样的文件或目录 然后我尝试按照以下方式运行,仍然出现错误, $ node /usr/lib/node_modules/azure-functions-cli/lib/main.js init events.js:161 throw er; // Unhandled 'error' event ^ Error: spawn mono /usr/lib/node_modules/azure-functions-cli/bin/func.exe ENOENT at exports._errnoException (util.js:1023:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT […]

无法在Azure Web应用程序上运行EXE文件

我想从nodejs服务器上的Azure Web应用程序上运行一个exe文件。 这个exe是由PyInstaller的一个简单的python文件创build的 。 var exec = require('child_process').exec; let cmd = 'hello.exe'; let child = exec( cmd, { cwd: path_to_exe_file }, function(error, stdout, stderr) { if (error === null) { res.render('index', { title: stdout }); } else { console.log(error); res.json({ 'status': '400', 'res': error }); } } ); 在我的机器上一切运行正常,但是当我部署到Azure web应用程序时,会发生错误: 应用程序启动失败,因为其并行configuration不正确 Error: Command failed: hello.exe […]

Node azure blobService.generateSharedAccessSignature()返回一个不正确的标记

我试图用Azure节点SDK生成共享访问签名,但返回的令牌不工作/缺less一些参数。 我创build令牌: app.get('/node-api/get-azure-token', (req, res, next) => { var blobService = azure.createBlobService(myStorageAccount, myAccessKey); var container = 'my-azure-container-name'; var startDate = new Date(); var expiryDate = new Date(startDate); expiryDate.setMinutes(startDate.getMinutes() + 10); startDate.setMinutes(startDate.getMinutes() – 5); var sharedAccessPolicy = { AccessPolicy: { ServiceVersion: '2016-05-31', Permissions: azure.BlobUtilities.SharedAccessPermissions.READ + azure.BlobUtilities.SharedAccessPermissions.WRITE + azure.BlobUtilities.SharedAccessPermissions.DELETE + azure.BlobUtilities.SharedAccessPermissions.LIST + azure.BlobUtilities.SharedAccessPermissions.ADD + azure.BlobUtilities.SharedAccessPermissions.CREATE, Start: startDate, […]

如何在JavaScript Azure函数中共享代码?

如何在Azure函数应用程序中的文件之间共享代码(例如,Mongo模式定义)? 我需要这样做,因为我的function需要访问共享的mongo模式和模型,比如这个基本的例子: var blogPostSchema = new mongoose.Schema({ id: 'number', title: 'string', date: 'date', content: 'string' }); var BlogPost = mongoose.model('BlogPost', blogPostSchema); 我已经尝试添加一个"watchDirectories": [ "Shared" ]行到我的host.json并在该文件夹中添加了一个包含上述variables定义的index.js ,但这似乎并没有提供给其他函数。 我只是Exception while executing function: Functions.GetBlogPosts. mscorlib: ReferenceError: BlogPost is not defined得到一个Exception while executing function: Functions.GetBlogPosts. mscorlib: ReferenceError: BlogPost is not defined Exception while executing function: Functions.GetBlogPosts. mscorlib: ReferenceError: BlogPost […]

Cosmos DB:MongoDBsorting查询返回空白结果集

我正在使用Mongoose.js 4.11.6 Node.js 6.0。 我有一个用户文件,看起来像波纹pipe – var UserSchema = new Schema({ name: { type: String, default: '' }, email: { type: String, default: '' }, phone: { type: String, default: '' }, hashed_password: { type: String, default: '' }, role: { type: String, default: '' }, created_at: { type: Date, default: Date.now } }); 我正在运行下面的mongoose查询 […]

实现通知到Web应用程序,而不使用Ajax调用服务器等

案例场景:我有几个2k并发用户使用各种设备访问网站,但使用他们的浏览器。 一旦其中一个创build新的话题,所有其他目前连接的人应该收到通知(基本上我简单更新应用程序右上angular的小图标号)。 一种方法是让web应用程序通过ajax调用不断请求更新,但这会使我的慢速服务器出现大量请求。 我使用azure色来托pipe我的networking应用程序(用PHP编写)。 我的托pipe软件包中包含了一些服务,例如事件中心,服务总线等。我可以使用什么服务来让我的支持话题在有新post的情况下发送到“服务”,而不是有“服务”与我的客户(他们的浏览器)交谈,并通知他们有关新的通知或任何types的数据更新?

尝试通过节点createBlockBlobFromStream()将Blob上载到Azure存储时发生“RequestBodyTooLarge”

当我尝试从Azure节点sdk上使用createBlockBlobFromStream()将100MBfile upload到Azure blob存储时,收到此错误: error: { code: 'RequestBodyTooLarge', message: 'The request body is too large and exceeds the maximum permissible limit. maxlimit: '67108864' } 有任何想法吗? 最大blob大小似乎是200GB,或50.000块。 我检查了常量,块大小设置在4MB,这是最大的。 SDK错误,或者我错过了什么?

现在在Windows Azure上

我成功地用nodeJS&nowJS创build了一个小型聊天应用程序。 它在我的本地机器上运行完美。 现在我想在Windows Azure上托pipe聊天应用程序。 我已经有一个nodeJS服务器在我的Windows Azure帐户上工作,但我不断收到以下错误: [Error: Unable to load shared library C:\DWASFiles\Sites\ben-goevaerts\VirtualDirectory0\site\wwwroot\node_modules\now\node_modules\node-proxy\build\Release\nodeproxy.node] 假设nowJS或socket.io没有正确安装。 (?)我找不到关于nowJS和windows Azure的任何文档。 谢谢! 完整的错误:(以防万一) [Error: Unable to load shared library C:\DWASFiles\Sites\ben- goevaerts\VirtualDirectory0\site\wwwroot\node_modules\now\node_modules\node-proxy\build\Release\nodeproxy.node] Error: Unable to load shared library C:\DWASFiles\Sites\ben-goevaerts\VirtualDirectory0\site\wwwroot\node_modules\now\node_modules\node-proxy\build\Release\nodeproxy.node at Object..node (module.js:472:11) at Module.load (module.js:348:31) at Function._load (module.js:308:12) at Module.require (module.js:354:17) at require (module.js:370:17) at Object.<anonymous> (C:\DWASFiles\Sites\ben-goevaerts\VirtualDirectory0\site\wwwroot\node_modules\now\node_modules\node-proxy\lib\node-proxy.js:1:90) at Module._compile (module.js:441:26) at […]