initial commit

This commit is contained in:
jackycheng
2025-08-25 17:11:15 +08:00
commit 436b6f66a6
31 changed files with 8295 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import path from "path";
import { Sequelize } from "sequelize";
export const sequelize = new Sequelize({
dialect: "sqlite",
storage: path.resolve(__dirname, process.env.DB_PATH || "./data.sqlite"),
});
async function initializeDatabase() {
try {
await sequelize.authenticate();
/**
* add database table here
*/
} catch (error) {
console.error("connect db error:", error);
}
}
initializeDatabase();