Socket
Book a DemoInstallSign in
Socket

koyeb-api

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koyeb-api

Koyeb REST API wrapper for nodejs

latest
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

Koyeb API Wrapper

An API wrapper for Koyeb Rest API (v1.0.0), which 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)

Keywords

koyeb

FAQs

Package last updated on 20 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts