SRYDEN Nebula
Node.js wrapper for the Pterodactyl API.
This isn't fully finished, actions such as edit are not added.
Installation
Install with npm:
npm install @sryden/nebula
Usage
const nebula = require('@sryden/nebula');
nebula.config({
panel: 'https://pterodactyl.test',
apikey: 'ptla_xxxxxxxxxxxxxxxxxxxx',
});
nebula.servers.list()
.then((serverList) => console.log('Server List:', serverList))
.catch((error) => console.error('Error:', error));
nebula.servers.getDetails(1)
.then((serverDetails) => console.log('Server Details:', serverDetails))
.catch((error) => console.error('Error:', error));
const newServer = {
name: 'Kinetic Nibbler',
user: 1,
};
nebula.servers.create(newServer)
.then((createdServer) => console.log('Created Server:', createdServer))
.catch((error) => console.error('Error:', error));
Configuration
Before using Nebula, make sure to configure it with your Pterodactyl panel URL and API key:
nebula.config({
panel: 'https://pterodactyl.test',
apikey: 'ptla_xxxxxxxxxxxxxxxxxxxx',
});
Replace the placeholder config with your actual Pterodactyl panel URL and API key.