Skip to content

Instantly share code, notes, and snippets.

@kauemurakami
Last active June 1, 2020 18:03
Show Gist options
  • Save kauemurakami/7681005abb1ea5d269cfff574cc90648 to your computer and use it in GitHub Desktop.
Save kauemurakami/7681005abb1ea5d269cfff574cc90648 to your computer and use it in GitHub Desktop.
arquivo db
import { Database } from 'https://deno.land/x/denodb/mod.ts';
import Client from "../models/client.ts";
const db = new Database(
"mysql",{
database: "NOME-DA-BASE-DE-DADOS",
host: "localhost",
username: "root",
password: "senha",
}
)
//array de modelos
db.link([Client])
//drop/create no inicio da aplicação
//await db.sync({drop: true})
export default db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment