Recent Posts

Caution: Greetings to all visitors. The site is working in short. Links Please skip the link to view any topic and thank you for visiting
header ads

Properly passing objects between my applications models/modules

I have several models/modules such as User, Wallet, both these modules that are called from the express application such as User.login(req,res);

right now in each User.js and Wallet.js I am including database.js which looks like this:


var mysql = require('mysql2/promise')
var pool = mysql.createPool({
    connectionLimit: 10,
    host: 'localhost',
    user: 'x',
    password: 'x',
    database: 'x'
});
pool.getConnection((err, connection) => {
    if (err) {
        if (err.code...
Code (markup):
Properly passing objects between my applications models/modules

from JavaScript https://ift.tt/2Uinr9I
via IFTTT

Post a Comment

0 Comments