Answers for "javascript interact with database"

0

javascript interact with database

// Javascript connect to ddb:

const mysql = require('mysql');

const con = mysql.createConnection({
  
  host: "localhost",
  user: "yourusername",
  password: "yourpassword"

  });

con.connect(function(err) {
  if (err) throw err;
  console.log("Connected!");
});
Posted by: Guest on July-17-2021

Code answers related to "javascript interact with database"

Code answers related to "Javascript"

Browse Popular Code Answers by Language