> links must contain three columns
> "longurl" of varchar(100), "shorturlid" of varchar(100) & "count" of int type
Run the following commands
npm init
npm install node express mysql mysql2
const con = mysql.createConnection({
host: "localhost",
user: "YOUR_MYSQL_USERNAME_HERE",
password: "YOUR_MYSQL_PASSWORD_HERE",
database: "YOUR_MYSQL_DATABASE_NAME",
authPlugins: {
mysql_clear_password: () => () => {
return signer.getAuthToken({
region,
hostname,
port,
username
});
}
},
});
node code.js