Skip to content
Amaury edited this page Oct 10, 2021 · 3 revisions

Welcome to the decodb wiki!

Usage

  // use any Connector
  const connector = new DenoDB.MySQLConnector({
    ...
  });
  const db = new DenoDB.Database(connector);

  // This is where the magic happens
  await setupDatabase(db, {
    models: [Article, Comment, User],
  });

  // sync the DB (optional)
  await db.sync({ drop: true });
Clone this wiki locally