express database
Some Databases :
1.https://pouchdb.com/ - Light Weight - Alot of Functions
2.https://dbdb.io/db/nedb - Light Weight - Easy To Use
3.https://www.mongodb.com/ - Best DB - Complex To Use
express database
Some Databases :
1.https://pouchdb.com/ - Light Weight - Alot of Functions
2.https://dbdb.io/db/nedb - Light Weight - Easy To Use
3.https://www.mongodb.com/ - Best DB - Complex To Use
how to access a database in express
var mysql = require('mysql')
var connection = mysql.createConnection({
host: 'localhost',
user: 'dbuser',
password: 's3kreee7',
database: 'my_db'
})
connection.connect()
connection.query('SELECT 1 + 1 AS solution', function (err, rows, fields) {
if (err) throw err
console.log('The solution is: ', rows[0].solution)
})
connection.end()
mongodbClint express
var MongoClient = require('mongodb').MongoClient
MongoClient.connect('mongodb://localhost:27017/animals', function (err, db) {
if (err) throw err
db.collection('mammals').find().toArray(function (err, result) {
if (err) throw err
console.log(result)
})
})
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us