Dumb Shit

This commit is contained in:
2025-05-14 13:58:54 +02:00
parent 042df4943f
commit 5f0f970f14
2 changed files with 18 additions and 0 deletions
View File
+18
View File
@@ -0,0 +1,18 @@
const fs = require('fs');
const bs3 = require('better-sqlite3')
const db = bs3('database.db');
// Initial Boot (Create Tables if needed)
var aaaaaa = true;
const sqlFilePath = 'file.sql';
const sql = fs.readFileSync(sqlFilePath, 'utf8');
if (aaaaaa) {
db.exec(sql);
}
/*const row = db.prepare('SELECT * FROM content LIMIT 1').all();
console.log(row.name, row.price, row.url);
console.log(row);*/