UNPKG

bamazon-cli

Version:

Find everything you need at Bamazon! Bamazon, the node cli shopping app is an interactive app which allows the users to purchase items as a customer, view, track and update the product inventory as a manager, and track the total sales by department as a s

19 lines (17 loc) 642 B
require('dotenv').config() const mysql = require('mysql'); // give the info need to connect const connection = mysql.createConnection('mysql://v0ez2rs3j0hpctxb:cgodeh4fto1pl22v@v02yrnuhptcod7dk.cbetxkdyhwsb.us-east-1.rds.amazonaws.com:3306/dxk07wsbmzvxv4fl'); // { // host: 'localhost', // port: 3306, // user: 'root', // password: process.env.DB_PW, // put password in .env file for good pratice // database: 'bamazon' // } // make the connection to bamazon db connection.connect(err => { if (err) throw err; // console.log(`Connected as: ${connection.threadId}`); // log the id }); module.exports = connection;