SQLite3 is the file based database

  • No server needed.
  • Just one file → .db

You can embed this DB inside your desktop app, CLI tool or small web backend.

For using SQLite3 we need a SQLite3 package and web admin panel. You can install it from NPM

npm install sqlite3 sqlite3-admin

Making a database connection

First of all for using SQLite3 database you need a making connection (for instance create a file db.js):

const sqlite3 = require('sqlite3').verbose();

// Opens database file
// if file not exists → it will create automatically
const db = new sqlite3.Database('./app.db');

Run your db.js:

node db.js

And then we’ll connect it to sqlite3 admin panel for viewing it visually (for checking that our codes runs correctly or not). For c…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help