code: function downloadCode(db, codePath) {
    return mkdir(codePath)
      .then(() => db.code.loadModules())
      .then((modules) => Promise.all(modules.map(module => downloadCodeModule(db, module, codePath))));
  }
docs: Download all Baqend code.
  
  @param {EntityManager} db The entity manager to use.
  @param {string} codePath The path where code should be downloaded to.
  @return {Promise<void>} Resolves when downloading has been finished.