easypanel.js

Xiao

easypanel.js

💬 Object-oriented library to interact with Easypanel!.

Installation

npm install easypanel.js

Example

Here is a an example

import "dotenv/config";
import { Client } from "easypanel.js";

export const client = new Client({
endpoint: process.env.domain, // easypanel domain https://easypanel.example.com
//@deprecated
credentials: {
email: process.env.email,
password: process.env.psw,
},
token: process.env.token, // when provided package will skip authenticating if token works!
});

client.on("ready", async () => {
console.log("Client is ready!");
console.log(await client.projects.list());
});

await client.login();

Vitest Test Results

{
"version": "0.34.6",
"results": [
[":tests/license.test.ts", { "duration": 146, "failed": false }],
[":tests/setting.test.ts", { "duration": 2803, "failed": false }],
[":tests/monitor.test.ts", { "duration": 4484, "failed": false }],
[":tests/projects.test.ts", { "duration": 481, "failed": false }],
[":tests/services.test.ts", { "duration": 3855, "failed": false }]
]
}

You may find all examples on Github

Links

Generated using TypeDoc