Simple SQLite3 and NodeJS interactions

Firstly install sqlite3, npm -g install sqlite3 then:

const sqlite3 = require('sqlite3');
var yourdb = new sqlite3.Database('yourdb.sqlite3');
yourdb.all("select * from yourtable", [], (e, row) => {
  console.log(row) 
})
nodejs sql-sqlite javascript

Edit on github
comments powered by Disqus
Click me