13 lines
301 B
TypeScript
13 lines
301 B
TypeScript
import { Sequelize } from "sequelize";
|
|
|
|
export const sql = new Sequelize("sqlite://./blitzcrank.sqlite");
|
|
|
|
export async function initDb() {
|
|
try {
|
|
await sql.authenticate();
|
|
console.log("Connected to database");
|
|
} catch (error) {
|
|
console.error("Unable to connect to the database:", error);
|
|
}
|
|
}
|