Skip to content

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.

License

Notifications You must be signed in to change notification settings

souravkl11/koyeb-api-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Koyeb API Wrapper

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.

Install

npm install koyeb-api

Usage/Examples

Import it to your code using

const Client = require('koyeb-api');
const Koyeb = new Client("YOUR-API-TOKEN"); 

Get app list

const result = await Koyeb.getApps()
console.log(result)

Get services

const result = await Koyeb.getServices()
console.log(result)

Get app details

const appName = "my-app"
const result = await Koyeb.getAppInfo(appName)
console.log(result)

Get service details

const service_id = "your-service-id" // Get service id using Koyeb.getServices() method
const result = await Koyeb.getServiceInfo()
console.log(result)

Creating/Updating service environment variables

const options = {
    Var: "PORT"
    value: "3000"
    serviceName: "my-service"
}
await Koyeb.setEnv(options)

Redeploy service

const serviceName = "my-service"
await Koyeb.reDeploy(serviceName)

Pause service

const serviceName = "my-service"
await Koyeb.pauseService(serviceName)

Get activity list

const result = await Koyeb.listActivities()
console.log(result)

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published