Add the following code to your app.js
file within the db.serialize()
block, after the table creation:
// Insert data into the "accounts" table
const stmt = db.prepare('INSERT INTO accounts (private_key, address, decimalNumber, has_transactions) VALUES (?, ?, ?, ?)');
stmt.run('private_key_value', 'address_value', 'decimalNumber_value', 1, function(err) {
if (err) {
console.error('Error inserting data:', err.message);
} else {
console.log(`A row has been inserted with rowid ${this.lastID}`);
}
});
stmt.finalize();