ok, implement sqlite
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user