ok, implement sqlite

This commit is contained in:
Leon Serfaty G
2025-07-17 11:12:35 +00:00
parent 09e59d46bd
commit 5f38178a60
8 changed files with 391 additions and 45 deletions
+16
View File
@@ -0,0 +1,16 @@
import Database from 'better-sqlite3';
// Use a file-based database in development
const db = new Database('local.db');
// Create the users table if it doesn't exist
db.exec(`
CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
email TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
name TEXT NOT NULL
)
`);
export default db;