I'm writing d3 visualization code to append counts and rectangle boxes around the counts on .JPEG image. In order to get dynamic data I used typescript+node JS+D3 JS. I need to use Vertica DB.
How to install plugin to connect to db from typescript+nodeJS?
I tried node-vertica plugin and could not integrate it properly.
---------------
Code in app.js:
---------------
var config = {
ssl: 'optional',
interruptible: true,
host: '*******',
user: '*********',
password: '********',
database: '********'
};
try {
conn = Vertica.connect(config, (err, conn) => {
if (err) {
console.log(err);
} else {
conn.connect(function(err) {
if (err) throw err;
conn.query("select * from *****", function (err, result, fields) {
if (err) throw err;
console.log(result);
});
});
}
});
}
catch (error) {
console.log("Error has been caught --"+error);
}