Node.js SDK Installation

Get started with the easyCDN Node.js SDK by installing the package and setting up your server-side file upload integration.

Prerequisites

Before installing the easyCDN Node.js SDK, make sure you have:

  • Node.js 18+- The SDK requires Node.js 18 or later
  • easyCDN Account- Sign up at easycdn.co

Installation

Install the Node.js SDK using npm:

Using npm

bash
npm install @easycdn/server

Using yarn

bash
yarn add @easycdn/server

Using pnpm

bash
pnpm add @easycdn/server

TypeScript Support

The SDK is written in TypeScript and includes full type definitions. No additional @types packages are needed.

Verification

To verify the installation was successful, try importing and initializing the client:

typescript
import { createClient } from '@easycdn/server'

const client = createClient({
  secretKey: process.env.EASYCDN_SECRET_KEY!
})

console.log('easyCDN Node.js SDK installed successfully!')