Server-Side SDKs
Ensure you have completed the Prerequisites section before continuing.
Installation & Configuration
- Node.js
- Python
- Ruby
If you're using npm:
npm install @dashx/node
If you're using yarn:
yarn add @dashx/node
const DashX = require('@dashx/node');
// Initialize DashX SDK
const dx = DashX.createClient({
publicKey: process.env.DASHX_PUBLIC_KEY,
privateKey: process.env.DASHX_PRIVATE_KEY,
});
The SDK can also be initialized with no parameters, dashx-node
will then look for these env variables DASHX_PUBLIC_KEY
and DASHX_PRIVATE_KEY
.
const DashX = require('@dashx/node');
// Initialize DashX SDK
const dx = DashX.createClient();
pip install dashx
Add this line to your application's Gemfile:
gem 'dashx'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install dashx
require 'dashx'
DashX.configure do |config|
config.public_key = ENV['DASHX_PUBLIC_KEY']
config.private_key = ENV['DASHX_PRIVATE_KEY']
end