cloud-detect-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.12 • Public • Published

cloud-detect-js

License Version Dependencies Issues Size Node

cloud-detect-js is a Node.JS module that determines a host's cloud provider. Highly inspired by the Go based Satellite, cloud-detect-js uses the same techniques (file systems and provider metadata) to properly identify cloud providers. Currently Supports AWS, GCP, Azure, Alibaba, Oracle, and Digital Ocean Cloud Providers.

Installation

Via NPM:

npm install --save cloud-detect-js

Via Yarn:

yarn add cloud-detect-js

Usage

const { cloudProvider } = require('cloud-detect-js');
 
(async () => {
  await cloudProvider();
  // wil return one of  'aws', 'gcp', 'azure', 'oracle', 'alibaba', 'do' or 'unknown'
 
  await cloudProvider();
  // 'gcp'
 
  await cloudProvider(['aws', 'oracle']); //excluded
  // 'unknown'
})();

CLI Usage

Installation

Via NPM:

npm install -g cloud-detect-js

Via Yarn:

yarn add global cloud-detect-js

Usage

Usage: cloud-detect-js [options] [command]
 
Options:
  -V, --version  output the version number
  -h, --help     output usage information
 
Commands:
  detect|d       Detect's Host Machine's Cloud Provider
 
cloud-detect-js d
# aws 
 
cloud-detect-js detect
# gcp 

/cloud-detect-js/

    Package Sidebar

    Install

    npm i cloud-detect-js

    Weekly Downloads

    11

    Version

    1.0.12

    License

    MIT

    Unpacked Size

    40.3 kB

    Total Files

    26

    Last publish

    Collaborators

    • vithalreddy