Skip to content

Instantly share code, notes, and snippets.

@guzmonne
Created September 11, 2015 23:48
Show Gist options
  • Select an option

  • Save guzmonne/cfe61de8227f9f676713 to your computer and use it in GitHub Desktop.

Select an option

Save guzmonne/cfe61de8227f9f676713 to your computer and use it in GitHub Desktop.
if (Meteor.users.find().count() === 0){
Accounts.createUser({
username: 'admin',
email : 'gmonne@gmail.com',
profile : {
roles : ['admin'],
name : 'Administrator',
createdBy : 'Meteor.fixture.js',
createdAt : moment().utc().format()
}
});
Accounts.setPassword(Meteor.users.findOne(), 'admin');
console.log('Default "admin" account created');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment