{"id":30598299,"url":"https://github.com/leopardslab/nodecloud","last_synced_at":"2025-08-29T22:13:20.531Z","repository":{"id":37004365,"uuid":"131184049","full_name":"leopardslab/nodecloud","owner":"leopardslab","description":":zap: The Node.js API for open cloud","archived":false,"fork":false,"pushed_at":"2023-09-02T07:05:50.000Z","size":5609,"stargazers_count":96,"open_issues_count":50,"forks_count":87,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-17T09:28:42.296Z","etag":null,"topics":["aws","azure","gcp","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leopardslab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-26T16:40:16.000Z","updated_at":"2025-01-17T14:44:48.000Z","dependencies_parsed_at":"2023-01-17T13:01:39.802Z","dependency_job_id":null,"html_url":"https://github.com/leopardslab/nodecloud","commit_stats":null,"previous_names":["cloudlibz/nodecloud"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/leopardslab/nodecloud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leopardslab%2Fnodecloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leopardslab%2Fnodecloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leopardslab%2Fnodecloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leopardslab%2Fnodecloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leopardslab","download_url":"https://codeload.github.com/leopardslab/nodecloud/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leopardslab%2Fnodecloud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272772763,"owners_count":24990514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","azure","gcp","nodejs"],"created_at":"2025-08-29T22:13:19.927Z","updated_at":"2025-08-29T22:13:20.508Z","avatar_url":"https://github.com/leopardslab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/leopardslab/nodecloud/master/assets/logo.png\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eNodeCloud\u003c/h1\u003e\n\u003cp align=\"center\"\u003eMaking open cloud easily accessible and managed.\u003c/p\u003e\n\n\u003c!-- BADGES --\u003e\n\n![nodecloud CI](https://github.com/cloudlibz/nodecloud/workflows/nodecloud%20CI/badge.svg)\n\n[![npm version](https://badge.fury.io/js/nodecloud.svg)](https://badge.fury.io/js/nodecloud)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b94b1fe2ac724e8083f8237de3473c8a)](https://www.codacy.com/app/rehrumesh/nodecloud?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=cloudlibz/nodecloud\u0026utm_campaign=Badge_Grade)\n[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)\n[![Gitter](https://img.shields.io/badge/chat-on%20gitter-brightgreen)](https://gitter.im/cloudlibz/cloudlibz)\n[![Read on : Medium](https://img.shields.io/badge/Read%20on-Medium-black.svg)](https://medium.com/leopards-lab)\n[![Mailing list : Scorelab](https://img.shields.io/badge/Mailing%20list-Scorelab-blue.svg)](https://groups.google.com/g/score-community)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-ff69b4.svg?style=flat)](https://github.com/leopardslab/nodecloud/issues)\n\nTable of Content\n\n-   [Introduction](#introduction)\n-   [Supported Service Providers](#-supported-service-providers)\n-   [Getting Started](#getting-started)\n    -   [NodeCloud Plugins](#nodecloud-plugins)\n    -   [Example](#example)\n-   [Overriding Providers](#overriding-providers)\n-   [Service Types](#-service-types)\n-   [Development setup](#-development-setup)\n-   [Important Notes for Developers](#important-notes-for-developers-)\n-   [Test Changes](#test-changes)\n-   [NodeCloud Code Generation tool](#nodecloud-code-generation-tool)\n-   [License](#-license)\n\n# Introduction\n\n**`NodeCloud ☁️`** is a standard library to get a single API on the open cloud with multiple providers. It is a NodeJs library which comes with plugins for each cloud provider. NodeCloud's aim is to abstract away the differences between different cloud providers. It provides an easy to use API for developers in order to interact with different cloud providers.\n\nNodeCloud will be useful to you if:\n\n-   you work on a project which uses multiple cloud providers\n-   you are looking for an abstract cloud API which can switch between cloud providers with fewer code changes\n-   you are an open-source enthusiast who is into cloud engineering or code generation\n-   you want to improve your skills in NodeJS, Typescript and cloud service providers\n\n## 📘 Supported Service Providers\n\n-   Amazon Web Services (AWS)\n-   Azure\n-   Google Cloud Platform (GCP)\n-   DigitalOcean\n-   AliCloud\n-   Oracle\n-   Linode\n\n_📢 if your required cloud provider plugin is not listed here, we'd love your help to add it :)_\n\n# Getting Started\n\nIn order to use `NodeCloud`, you will need to follow the following steps:\n\n**1️⃣ Download NodeCloud common module**  \nHead on over to NPM or Yarn to download the latest version of NodeCloud.\n\n```\nnpm i @nodecloud/common\nor\nyarn add @nodecloud/common\n```\n\n**2️⃣ Download at least one NodeCloud plugin**  \nOnce `@nodecloud/common` is installed, you need to install the plugins to interact with different cloud providers. The below table shows the available plugins maintained by ScoRe Lab. There can be other community-driven plugins that you will be able to use with NodeCloud.\n\n### NodeCloud Plugins\n\n| Plugin               | Installation                                                            |\n| -------------------- | ----------------------------------------------------------------------- |\n| AWS plugin           | `yarn add @nodecloud/aws-plugin` or `npm i @nodecloud/aws-plugin`       |\n| Azure plugin         | `yarn add @nodecloud/gcp-plugin` or `npm i @nodecloud/gcp-plugin`       |\n| Google Cloud plugin  | `yarn add @nodecloud/azure-plugin` or `npm i @nodecloud/azure-plugin`   |  |\n| Digital Ocean plugin | `yarn add @nodecloud/do-plugin` or `npm i @nodecloud/do-plugin`         |\n| Alibaba plugin       | `yarn add nodecloud-ali-plugin` or `npm i nodecloud-ali-plugin`         |\n| Oracle plugin        | `yarn add @nodecloud-oracle-plugin` or `npm i @nodecloud-oracle-plugin` |\n| Linode plugin        | `yarn add @nodecloud-linode-plugin` or `npm i @nodecloud-linode-plugin` |\n\n**3️⃣ Create the NodeCloud config file**\n\nCreate the `.nc.config.js` file in the project root in the following format.\n\nContent of .nc.config.js file is assumed as the following structure. It is an array of supported providers.\n\n1. `name` : Provider identifier, this can be used to identify the plugin at a glance.\n2. `tag` : Tag name that will be used to load the given provider internally.\n3. `plugin` : Plugin module\n4. `configPath` : Provider configuration file\n\nThis config file can contain an array of objects for all providers and all will be loaded. Supported values for name : aws, azure, alicloud, digitalocean, google\n\n### Example\n\n```js\nconst nodeCloudAwsPlugin = require('@nodecloud/aws-plugin');\nconst nodeCloudGcpPlugin = require('@nodecloud/gcp-plugin');\nconst nodeCloudAzurePlugin = require('@nodecloud/azure-plugin');\nconst nodeCloudDoPlugin = require('@nodecloud/do-plugin');\nconst nodeCloudOraclePlugin = require('@nodecloud/oracle-plugin');\nconst nodeCloudLinodePlugin = require('@nodecloud/linode-plugin');\n\nconst providers = [\n\t{\n\t\tname: 'aws',\n\t\ttag: 'aws',\n\t\tplugin: nodeCloudAwsPlugin,\n\t\tconfigPath: 'C:\\\\Users\\\\Rajitha\\\\opensource\\\\aws_cred.json',\n\t},\n\t{\n\t\tname: 'google',\n\t\ttag: 'google',\n\t\tplugin: nodeCloudGcpPlugin,\n\t\tconfigPath: {\n\t\t\tprojectId: 'astral-hold-276807',\n\t\t\tkeyFilename: 'C:\\\\Users\\\\Rajitha\\\\opensource\\\\gcp_cred.json',\n\t\t},\n\t},\n\t{\n\t\tname: 'azure',\n\t\ttag: 'azure',\n\t\tplugin: nodeCloudAzurePlugin,\n\t},\n\t{\n\t\tname: 'digitalocean',\n\t\ttag: 'do',\n\t\tplugin: nodeCloudDoPlugin,\n\t},\n\t{\n\t\tname: 'oracle',\n\t\ttag: 'oracle',\n\t\tplugin: nodeCloudOraclePlugin,\n\t},\n\t{\n\t\tname: 'linode',\n\t\ttag: 'linode',\n\t\tplugin: nodeCloudLinodePlugin,\n\t},\n];\nmodule.exports = providers;\n```\n\n**4️⃣ Enjoy the awesomeness of NodeCloud**\n\nCongratulations! You just configured NodeCloud in your project. Let's start with some cloud interactions.\n\nThe below code is an example of usage in AWS.\n\n```js\nconst nc = require('@nodecloud/common'); // NodeCloud common module\nconst optionsProvider = {\n\toverrideProviders: false,\n};\nconst ncProviders = nc.getProviders(optionsProvider);\nconst options = {\n\tapiVersion: '2017-11-01',\n};\n\nconst computeModule = ncProviders.aws.compute(options);\n\nfunction launchInstance() {\n\tconst instanceParams = {\n\t\tImageId: 'ami-07ebfd5b3428b6f4d', // Image of Ubuntu Server 18.04 LTS\n\t\tInstanceType: 't2.micro',\n\t\tKeyName: 'nodeCloud', // key name of Key pair\n\t\tMinCount: 1,\n\t\tMaxCount: 1,\n\t};\n\n\t// create AWS EC2 instance\n\tcomputeModule\n\t\t.create(instanceParams)\n\t\t.then(res =\u003e {\n\t\t\tconsole.log(`All done ! ${res}`);\n\t\t})\n\t\t.catch(err =\u003e {\n\t\t\tconsole.log(`Oops something happened ${err}`);\n\t\t});\n}\n\nfunction stopInstance() {\n\tconst params = {\n\t\tInstanceIds: ['i-0928af5c626f85da9'],\n\t\tDryRun: false,\n\t};\n\n\t// stop AWS EC2 instance\n\tcomputeModule\n\t\t.stop(params)\n\t\t.then(res =\u003e {\n\t\t\tconsole.log(res);\n\t\t})\n\t\t.catch(err =\u003e {\n\t\t\tconsole.log(err);\n\t\t});\n}\n```\n\n## Overriding Providers\n\nNodeCloud officially supports AWS, GCP, Azure, DigitalOcean and AliCloud. If you want to use a community-driven plugin override the providers' list as follows.\n\n```js\nconst nodeCloud = require('nodecloud');\nconst options = {\n\toverrideProviders: true,\n};\nconst ncProviders = nodeCloud.getProviders(options);\n```\n\n## 📟 Service Types\n\n| Service Category        | Service                             |                  AWS                  |                GCP                |                                  Azure                                  |               DigitalOcean                |                       AliCloud                        |            Linode             |        Oracle         |\n| ----------------------- | ----------------------------------- | :-----------------------------------: | :-------------------------------: | :---------------------------------------------------------------------: | :---------------------------------------: | :---------------------------------------------------: | :---------------------------: | :-------------------: |\n| Compute                 | IaaS                                |                  EC2                  |          Compute Engine           |                             Virtual Machine                             |                 Droplets                  |                          ECS                          |            Linodes            | OCI ContainerInstance |\n|                         | Faas                                |             AWS Lambda\\*              |         Cloud Functions\\*         |                            Azure Functions\\*                            |                     -                     |                  Function Compute\\*                   |               -               |           -           |\n|                         | Containers                          |               ECS, EKS                |     Google Kubernetes Engine      |                       AKS, Azure Service Fabric\\*                       |               DO Kubernetes               | Container Service*, Container Service for Kubernetes* |              LKS              |  OCI ContainerEngine  |\n|                         | Containers (without infrastructure) |             AWS Fargate\\*             |            Cloud Run\\*            |                                    -                                    |                     -                     |                         ECI\\*                         |               -               |           -           |\n|                         | Paas                                |         AWS Elastic Beanstalk         |           App Engine\\*            |                               App Service                               |                     -                     |              Simple Application Server\\*              |               -               |           -           |\n| Storage                 | Object Storage                      |                  S3                   |           Cloud Storage           |                           Azure Blob Storage                            |                 Spaces\\*                  |                     Bucket (OSS)                      |        Object Storage         |  OCI Object Storage   |\n|                         | Block Storage                       |                  EBS                  |         Persistent Disks          |                              Disk Storage                               |                  Volumes                  |                         NAS\\*                         |               -               |      OCI Volume       |\n| Networking              | Load Balancer                       |                  ELB                  |      Cloud Load Balancing\\*       |                           Azure Load Balancer                           |             DO Load Balancer              |                          SLB                          |         Node Balancer         |   OCI LoadBalancer    |\n|                         | Peering/Dedicated Interconnect      |            Direct Connect             |       Cloud Interconnect\\*        |                             ExpressRoute\\*                              |                     -                     |                   Express Connect\\*                   |               -               |           -           |\n|                         | DNS                                 |                Route53                |     Google Domains, Cloud DNS     |                                Azure DNS                                |                  DO DNS                   |                  Alibaba Cloud DNS\\*                  |            Domains            |        OCI DNS        |\n| Databases               | RDBMS                               | RDS, Amazon Aurora*, Amazon Redshift* |    Cloud SQL\\*, Cloud Spanner     | SQL Database, Azure Database for MySQL*, Azure Database for PostgreSQL* | Managed Databases(PostgreSQL\\* and MySQL) | ApsaraDB (MySQL, MariaDB TX, SQL Server, PostgreSQL)  | Database(Postgres and Myssql) |       OCI Mysql       |\n|                         | NoSQL: key-value                    |               DynamoDB                | Cloud Firestore, Cloud Bigtable\\* |                              Table Storage                              |        Managed Databases(Redis)\\*         |                 ApsaraDB for Redis\\*                  |               -               |      OCI MongoDb      |\n|                         | NoSQL: indexed                      |           Amazon SimpleDB\\*           |          Cloud Firestore          |                                Cosmos DB                                |                     -                     |                ApsaraDB for MongoDB\\*                 |               -               |           -           |\n| Security/ Authorization | Identity Access Management          |                AWS IAM                |            Cloud IAM\\*            |        Azure Active Directory*, Azure Role Based Access Control*        |                     -                     |             Resource Access Management\\*              |               -               |           -           |\n| Management              | Key Management                      |                AWS-KMS                |                 -                 |                                    -                                    |                  Do-Keys                  |                           -                           |          Monitoring           |   OCI KeyManagement   |\n| Firewalls               | Firewalls                           |                   -                   |                 -                 |                                    -                                    |                     -                     |                           -                           |           Firewalls           |           -           |\n| Images                  | Images                              |                   -                   |                 -                 |                                    -                                    |                     -                     |                           -                           |            Images             |           -           |\n| Blockchain              | Blockchain                          |                   -                   |                 -                 |                                    -                                    |                     -                     |                           -                           |               -               |    OCI Blockchain     |\n\n\\*yet to be implemented\n\n## Contributing ❤️\n\nNodeCloud relies on the passionate members of its community to keep delivering impactful tools to people all over the world. Contributions of any kind are welcome!\n\nYou can help us in many ways. Including new features, bug fixing, error reporting and documentation. Before contributing, be sure to consult NodeClouds's contribution guidelines. As a member of our community, you must abide by our Code Of Conduct.\n\n### 💻 Development setup\n\n**1️⃣ Fork the leopardslab/nodecloud repository**  \nFollow these instructions on [how to fork a repository](https://help.github.com/en/articles/fork-a-repo)\n\n**2️⃣ Cloning the repository**  \nOnce you have set up your fork of the `leopardslab/nodecloud` repository, you'll want to clone it to your local machine. This is so you can make and test all of your personal edits before adding it to the master version of `leopardslab/nodecloud` .\n\nNavigate to the location on your computer where you want to host your code. Once in the appropriate folder, run the following command to clone the repository to your local machine.\n\n```\ngit clone https://github.com/your-username/nodecloud.git\n```\n\n**3️⃣ Bootstrapping the repository**  \nYou'll then want to navigate within the folder that was just created that contains all of the content of the forked repository. There you'll want to run the installation script to get the updated version of all the third-party dependencies.\n\n```\ncd nodecloud\nyarn\n```\n\n### Important Notes for Developers 😎\n\n❇️ This project is based on [Lerna](https://lerna.js.org/) and Yarn workspaces where there are multiple projects in the same repository. It's better to get some background knowledge about these before making any changes in the code. Check the `lerna.json` for the current configuration.\n\n❇️ `@nodecloud/aws-plugin` , `@nodecloud/gcp-plugin` , `@nodecloud/azure-plugin` and `@nodecloud/common` are `Lerna` managed yarn workspaces where the `generator` is another standalone yarn workspace.\n\n❇️ **Never use NPM client to install third-party dependencies**. This project does not contain a `package-lock.json` instead it contains a `yarn.lock` file. Using `npm i` to install NPM modules will harm the project structure.\n\n❇️ Use `lerna` commands when installing third-party libraries in Lerna managed yarn workspaces. For example, the below command will add the `@google-cloud/translate` npm module to the project `@nodecloud/gcp-plugin` .\n\n```\nlerna add @google-cloud/translate --scope=@nodecloud/gcp-plugin\n```\n\n❇️ Adding a common dependency to **ALL** packages\n\n```\nlerna add the-dep-name\n```\n\n❇️ Adding Dev dependencies\n\nIf you have common dev dependencies, it’s better to specify them in the workspace root package.json. For instance, this can be dependencies like Jest, Husky, Storybook, Eslint, Prettier, etc.\n\n```\nyarn add husky --dev -W\n```\n\n_Adding the -W flag makes it explicit that we’re adding the dependency to the workspace root._\n\n❇️ Removing Dependencies\n\n```\nlerna exec -- yarn remove dep-name\n```\n\n❇️ Use symlinks when you want to make changes while testing them out in a demo project.** Do not use npm link** instead use yarn linking\n\n```\nyarn link\n```\n\nYou should see output like:\n\n_success Registered \"@nodecloud/gcp-plugin\". info You can now run `yarn link \"@nodecloud/gcp-plugin\"` in\nthe projects where you want to use this module and it will be used instead._\n\nNow that our package is symlinked, run the following command to link the package to your project.\n\n```\nyarn link @nodecloud/gcp-plugin\n```\n\n❇️ The API documentation is generated using JSDoc. Be mindful when making any changes to the auto-generated comments in JavaScript classes. If you have generated new classes run the following command to generate the API documentation.\n\n```\nyarn doc or `jsdoc -c jsdoc.json`\n```\n\n❇️ The JSDoc configuration can be found in the `jsdoc.json` file. Currently, it is configured with the [better-docs](https://www.npmjs.com/package/better-docs) template.\n\n❇️ The code generation component ( `generator` yarn workspace) is developed using the TypeScript compiler API. It is better to have an understanding of Abstract Syntax trees, Parsers, and transformers when making code changes in the `generator`.\n\n❇️ Please run prettier before committing code to put it in a nice looking format.\n\n```\nlerna run prettier or yarn pretty-quick\n```\n\n### Test Changes\n\n`Mocha` and `Chai` is configured to run unit tests in this project. When you start making changes to the code on your local branch, you'll need to test those changes. Before your code can be accepted into the master branch, it will have to pass all of the tests in yarn workspaces. To test changes, run the following commands:\n\n**1️⃣ Save Current Changes**  \nWhen you get to a point when you want to test the functionality of the code, make sure all your changes are saved. They don't necessarily have to be _committed_ changes in order to test them.\n\n**2️⃣ Test changes**  \nTo make sure that the application is properly updated, run the tests. If you add elements that do not have tests to prove whether they work correctly or not, please include them in your pull request. When you run the below test command `Lerna` will execute all the tests in the packages of this monorepo.\n\n```\nyarn test\n```\n\n## NodeCloud Code Generation tool\n\nThis is where the magic happens✨. We don't code any JavaScript classes in NodeCloud plugins, instead, they are automatically generated by a code generation tool. This automating process is currently working for AWS, Azure and Google Cloud. Once you add a service in `node-cloud.yml` in the required format for the generator, run `tsc main \u0026\u0026 node main` to generate the service. You will immediately see the output in `generatedClasses` directory inside the `generator` . More information about the generation tool can be found in the `ReadME` of `generator` workspace.\n\n## 📜 License\n\nMIT @ leopardslab\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleopardslab%2Fnodecloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleopardslab%2Fnodecloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleopardslab%2Fnodecloud/lists"}