Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (Database.instance) {
throw new Error(
"Error: Instantiation failed: Use Database.getInstance() instead of new.",
);
}
this.knex = knex({
client: "sqlite3",
connection: {
filename: "./db.sqlite",
},
});
this.bookshelf = bookshelf(this.knex);
bookshelf.instance = this;
}