- yarn db:create
- yarn db:drop
- connect()
- end()
- save() & createTable()
import db
import config
import Model
const db = new DB()
db.connect()
.then(()=>{
// some code
})
.then(() => {
db.end();
})
.catch((err) => {
console.log(err)
});
// User Model
export class User {
constructor(
public name?: string,
public phone?: string,
public address?: string
) {}
}