0.0.2 • Published 5 months ago

@gentlent/nodejs-plesk v0.0.2

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
5 months ago

Plesk TypeScript Library

This library provides a TypeScript interface for the Plesk REST API.
It is designed for integrating Plesk into your own Node.js/TypeScript projects, CLI tools, or automation scripts.

Features

  • TypeScript-typed methods for the Plesk API
  • Support for authentication via login/API key
  • Integration tests against a real Plesk instance (via Docker)
  • Easily extendable

Installation

npm install @gentlent/plesk

yarn add @gentlent/plesk

Example

import { PleskClient } from '@dein-namespace/plesk';

const plesk = new PleskClient({
  hostname: 'https://localhost:8443',
  apiKey: process.env.PLESK_API_KEY,
});

const result = await plesk.domains.list();
console.log(result);

Tests

yarn test

Docker Setup (Test-Plesk)

The docker-compose.yml file in the project starts a local Plesk instance. This setup is not suitable for production and is intended for testing and local development.

By default, you can access it at:

https://localhost:8443

Project Structure

.
├── src/                # TypeScript source code
├── tests/              # Integration tests
├── docker-compose.yml  # Plesk test container
├── .env.example        # Example configuration
└── README.md