有没有一种方法可以使用户成为帐户密码?就像是:
Users.insert
email: '[email protected]'
password: 'secret'
我尝试了很多事情,但还没有走运。在此先感谢您的帮助
在服务器启动时,最简单的方法是:
Meteor.startup(function() {
if (Meteor.users.find().count() === 0) {
Accounts.createUser({
username: 'test',
email: '[email protected]',
password: 'password'
});
}
});
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句