An unofficial API wrapper for Koyeb Rest API (v1.0.0). This module allows you to interact with the Koyeb platform in a simple, programmatic way using asyncronous functions.
npm install koyeb-api
const Client = require('koyeb-api');
const Koyeb = new Client("YOUR-API-TOKEN");
const result = await Koyeb.getApps()
console.log(result)
const result = await Koyeb.getServices()
console.log(result)
const appName = "my-app"
const result = await Koyeb.getAppInfo(appName)
console.log(result)
const service_id = "your-service-id" // Get service id using Koyeb.getServices() method
const result = await Koyeb.getServiceInfo()
console.log(result)
const options = {
Var: "PORT"
value: "3000"
serviceName: "my-service"
}
await Koyeb.setEnv(options)
const serviceName = "my-service"
await Koyeb.reDeploy(serviceName)
const serviceName = "my-service"
await Koyeb.pauseService(serviceName)
const result = await Koyeb.listActivities()
console.log(result)