1Some Databases :
2
31.https://pouchdb.com/ - Light Weight - Alot of Functions
42.https://dbdb.io/db/nedb - Light Weight - Easy To Use
53.https://www.mongodb.com/ - Best DB - Complex To Use
1var mysql = require('mysql')
2var connection = mysql.createConnection({
3 host: 'localhost',
4 user: 'dbuser',
5 password: 's3kreee7',
6 database: 'my_db'
7})
8
9connection.connect()
10
11connection.query('SELECT 1 + 1 AS solution', function (err, rows, fields) {
12 if (err) throw err
13
14 console.log('The solution is: ', rows[0].solution)
15})
16
17connection.end()
18
1var MongoClient = require('mongodb').MongoClient
2
3MongoClient.connect('mongodb://localhost:27017/animals', function (err, db) {
4 if (err) throw err
5
6 db.collection('mammals').find().toArray(function (err, result) {
7 if (err) throw err
8
9 console.log(result)
10 })
11})
12