Connect with Node. js using SSL
To enable SSL connections between SingleStore and Node.singlestore_
certificate file and use it to create the connection.
The following is an example of using the singlestore_
certificate file with node-mysql2.
var mysql = require("mysql2");var fs = require("fs");var connection = mysql.createConnection({host: HELIOS_CLUSTER_HOSTNAME,user: 'admin',password: HELIOS_ADMIN_PASSWORD,ssl: {ca: fs.readFileSync(__dirname + '/singlestore_bundle.pem')}});connection.connect();connection.end();
Last modified: June 22, 2022