Back to Documentation

Installation

Install and configure Bait Al-Aman in your project.

Prerequisites

  • Node.js 18.0 or higher
  • npm, yarn, or pnpm package manager
  • A Bait Al-Aman account with API access

Install the SDK

Install the Bait Al-Aman SDK using your preferred package manager:

npm
npm install @bait-al-aman/sdk
yarn
yarn add @bait-al-aman/sdk
pnpm
pnpm add @bait-al-aman/sdk

Configure Environment

Create a .env file in your project root:

BAIT_AL_AMAN_API_KEY=your_api_key_here
BAIT_AL_AMAN_ORG_ID=your_org_id
BAIT_AL_AMAN_ENV=production

Initialize the Client

Import and initialize the SDK in your application:

import { BaitAlAman } from '@bait-al-aman/sdk';

const client = new BaitAlAman({
  apiKey: process.env.BAIT_AL_AMAN_API_KEY,
  orgId: process.env.BAIT_AL_AMAN_ORG_ID,
});

// Test the connection
const status = await client.health();
console.log('Connected:', status.ok);

Next Steps