JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 55
  • Score
    100M100P100Q65500F
  • License ISC

API client for CapRover

Package Exports

  • caprover-api
  • caprover-api/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (caprover-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

https://github.com/caprover/caprover-api

Official CapRover API SDK (TypeScript)

A simple, typed Typescript SDK for the CapRover API.

EXPERIMENTAL - backward compatibility is not guaranteed.

Install

npm install caprover-api

Usage

import CapRoverAPI, { CapRoverModels } from 'caprover-api'

const caprover = new CapRoverAPI(
    'https://captain.server.demo.caprover.com',
    new SimpleAuthenticationProvider(() => {
        return Promise.resolve({
            password: 'captain42',
            otpToken: undefined,
        })
    })
)

caprover
    .getAllNodes()
    .then((response) => {
        console.log(response)
    })
    .catch((error) => {
        console.log(error)
    })

How to Run Locally

  1. npm install
  2. npm run dev (after putting your own password/URL!)