Connect with Node. js using SSL
Warning
SingleStore 9.0 gives you the opportunity to preview, evaluate, and provide feedback on new and upcoming features prior to their general availability. In the interim, SingleStore 8.9 is recommended for production workloads, which can later be upgraded to SingleStore 9.0.
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