JavaScript SDK
Official JavaScript/TypeScript SDK for Node.js and browsers
Installation
npm install @bycoded/bycloud-sdkQuick Start
Here's a quick example to get you started with the JavaScript SDK:
import { ByCloud } from "@bycoded/bycloud-sdk";// Initialize the clientconst client = new ByCloud({token: "YOUR_ACCESS_TOKEN",});// List all instancesconst instances = await client.compute.listInstances();console.log(instances);// Create a new instanceconst newInstance = await client.compute.createInstance({name: "my-instance",flavorId: "c1.medium",imageId: "ubuntu-22.04",});console.log(newInstance);
Features
- Full coverage of the ByCloud API
- Automatic request signing and authentication
- Built-in error handling and retries
- Strongly typed responses