Quickstart
Integrate PingDart seamlessly into your application using our official, fully-encrypted client libraries. Choose your language below to get the installation instructions and a basic query example.
1. Install the SDK
Clone and integrate the encrypted Node.js SDK.
Terminal
git clone https://github.com/pingdart/pingdartdb-node.git npm install ./pingdartdb-node/pingdartdb-node-encrypted.tgz
2. Connect and Query
Initialize the client with your credentials and run your first secure query.
example.js
const { PingDartDB } = require('pingdartdb-node');
const db = new PingDartDB('YOUR_API_KEY', {
host: '94.136.190.60',
user: 'pingdart_ravi',
password: 'Ravindra12@',
database: 'pingdart_test',
type: 'mysql'
});
async function run() {
await db.connect();
// 1. Define your Payload
const payload = {
columns: ['id', 'email'],
where: { status: 'active' }
};
try {
// 2. Execute Query & Get Response
const response = await db.table('users').read(payload);
console.log("Response Data:", response.data);
} catch (error) {
// 3. Handle Errors
console.error("SDK Error:", error.message);
}
}
run();