meteor - 如何在 Meteor.js 启动时禁用订阅通知?
问题描述
开始通知:
** You've set up some data subscriptions with Meteor.publish()
如何禁用?
解决方案
我假设您收到了整个错误消息:
** You've set up some data subscriptions with Meteor.publish(), but
** you still have autopublish turned on. Because autopublish is still
** on, your Meteor.publish() calls won't have much effect. All data
** will still be sent to all clients.
**
** Turn off autopublish by removing the autopublish package:
**
** $ meteor remove autopublish
**
** .. and make sure you have Meteor.publish() and Meteor.subscribe() calls
** for each collection that you want clients to see.
要使通知消失,只需执行它要求您执行的操作并运行:
meteor remove autopublish
是什么autopublish
?
Autopublish 是一个用于快速原型设计的包。它将所有集合从 MongoDB 发送到客户端以便于使用。从文档:
将所有服务器集合发布到客户端。这个包对于构建应用程序原型很有用,而无需担心哪些客户端可以访问某些数据,但应在应用程序需要限制客户端查看哪些数据时立即删除。
在将您的应用程序放到互联网上之前,您需要关闭它并使用出版物和订阅来保护、过滤和管理您的数据流
推荐阅读
- arduino - 在 Arduino 中解析 Adafruit Ultimate GPS
- javascript - 如果其值为真,则将字符串值添加到数组
- javascript - 无法使用 Node.js 创建 MongoDB 数据库
- javascript - S3:文件的唯一链接?
- xcode - Xcode 12 不显示所有搜索结果
- php - 尝试执行安全策略“PDF”@error/constitute.c/IsCoderAuthorized/408 不允许的操作
- angular - Angular 8 错误:content_script.js:71 级别:错误 | 模块:LEAKED_CREDENTIAL
- dynamic - 如何在模拟服务器中设计动态响应
- botframework - 微软机器人框架 - Python
- or-tools - 关于 or-tools Only EnforceIf,AddBool 和问题