https://github.com/caprover/caprover-api
https://github.com/caprover/caprover-api
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/caprover/caprover-api
- Owner: caprover
- Created: 2024-10-27T03:48:25.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-27T23:52:34.000Z (over 1 year ago)
- Last Synced: 2025-05-07T09:11:21.977Z (about 1 year ago)
- Language: TypeScript
- Size: 35.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
```ts
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!)_