I want to create an admin user if no users exist. I tried it on a js file inside the server folder
Meteor.startup(function () { if(!Meteor.users.find().count()
I've never found any problem on creating a user on Meteor. This is my coffeescript code:
Meteor.startup -> if Meteor.users.find.count() is 0 options = email: 'email@example.com' password: 'pass' Accounts.createUser(options)