import { Accounts } from 'meteor/accounts-base';

const seedUsers = () => {
  const userCount = Meteor.users.find().count();

  if (userCount === 0) {
    Accounts.createUser({
      username: 'evancorl',
      email: 'info@evancorl.com',
      password: 'password',
      profile: {},
    });
  }
};

export default seedUsers;

import { Accounts } from 'meteor/accounts-base';

const seedUsers = () => {
  const user = Meteor.users.findOne();

  if (!user) {
    Accounts.createUser({
      username: 'evancorl',
      email: 'info@evancorl.com',
      password: 'password',
      profile: {},
    });
  }
};

export default seedUsers;

Write faster query for seeding users
Write faster query for seeding users
