title: How to deal with calling sequelize.sync() first?
body: <p>I'm a bit new to developing in nodejs, so this is probably a simple problem.  I'm building a typical webapp based on express + sequelize.  I'm using sqlite in-memory since I'm just prototyping at the moment.  I understand if I were to use a persistent sqlite file, this may not be a problem, but that's not my goal at the moment.  Consider the following:</p>
  
  <pre><code>var User = sequelize.define("User", {
      "username": DataTypes.STRING,
      // etc, etc, etc
  });
  
  sequelize.sync();
  
  User.build({
      "username": "mykospark"
  });
  </code></pre>
  
  <p>At first, I got an error on User.build() about the Users table not existing yet.  I realized that sequelize.sync() was being called async, and the insert was happening before the table was created.  I then re-arranged my code so that the User.build() call was inside of  sequelize.sync().complete() which fixes the problem, but I'm not sure how to apply this to the rest of my project.</p>
  
  <p>My project uses models in a bunch of different places.  It is my understanding that I just want to call sequelize.sync() once after my models are defined, then they can be used freely.  I could probably find some way to block the entire nodejs app until sequelize.sync() finishes, but that doesn't seem like good form.  I suppose I could wrap every single model operation into a sequelize.sync().complete() call, but that doesn't seem right either.</p>
  
  <p>So how do people usually deal with this?</p>