Skip to main content

Node.js SDK Installation

Installing and configuring the Node.js SDK.

Prerequisites

  • Node.js 18+ or 20+
  • npm, pnpm, or yarn

Installation

npm install @easy/appserver-sdk

Or with pnpm:

pnpm add @easy/appserver-sdk

Project Setup

TODO: Document recommended project structure:

my-app/
├── src/
│ ├── index.ts # Main app entry
│ ├── lifecycle/ # Lifecycle hooks
│ │ ├── onCreate.ts
│ │ ├── onInstall.ts
│ │ └── ...
│ ├── services/ # Business logic
│ └── types/ # TypeScript types
├── package.json
├── tsconfig.json
└── .env

TypeScript Configuration

TODO: Add recommended tsconfig.json

Environment Variables

TODO: Document required environment variables for development:

  • AppServer connection URL
  • Database connection (if used)
  • Certificate paths

Module Format

The SDK supports both ESM and CommonJS:

import { createApp } from '@easy/appserver-sdk';

CommonJS

const { createApp } = require('@easy/appserver-sdk');

Development Workflow

TODO: Document development setup:

  1. Install SDK
  2. Create app structure
  3. Implement lifecycle hooks
  4. Run locally with AppServer
  5. Debug and iterate

Next Steps