Dumb Shit
This commit is contained in:
@@ -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);*/
|
||||||
Reference in New Issue
Block a user