Skip to content

upsun/upsun-sdk-node

Repository files navigation

Upsun SDK Node

Upsun SDK for Node/JS on TypeScript.
This SDK maps the Upsun CLI commands. For more information, read the documentation.

Caution

This project is currently in Beta, meaning features and APIs may evolve over time.

Please report bugs or request new features by creating a GitHub issue.

Install

To install the Upsun SDK, you can use npm. Run the following command in your terminal:

npm install upsun-sdk-node

Usage

To use the Upsun SDK, you need to initialize the Upsun class with your API key and connection URL. Here's an example:

import { UpsunClient, UpsunConfig } from "upsun-sdk-node";

const upsun = new UpsunClient({ apiKey: process.env.UPSUN_CLI_TOKEN || "" } as UpsunConfig);

const orgs = await upsun.organizations.list();
const prjs = await upsun.projects.list();
const result = await upsun.environments.redeploy("MyProjectId", "main");

Devel

Clone repository:

git clone git@github.com:upsun/upsun-sdk-node.git

Install Dep:

npm install
npm run spec:generate:install

Generate API Client (Low-level) base on OpenAPI spec.

npm run spec:generate

Build the stack:

npm run build

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.

License

This project is licensed under the Apache V2 License. See the LICENSE file for more details.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •