https://github.com/caprover/caprover-api
A simple, typed Typescript SDK for the CapRover API.
EXPERIMENTAL - backward compatibility is not guaranteed.
npm install caprover-api
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)
})
npm install
npm run dev
(after putting your own password/URL!)