https://github.com/scorelab/nodecloud
Cloud services library
https://github.com/scorelab/nodecloud
Last synced: 4 months ago
JSON representation
Cloud services library
- Host: GitHub
- URL: https://github.com/scorelab/nodecloud
- Owner: scorelab
- License: apache-2.0
- Created: 2016-11-17T16:08:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-30T04:11:02.000Z (over 8 years ago)
- Last Synced: 2024-04-24T11:11:43.004Z (about 2 years ago)
- Language: JavaScript
- Size: 179 KB
- Stars: 10
- Watchers: 5
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: code_of_conduct.md
Awesome Lists containing this project
README
# DEPRECATION NOTICE: THIS REPO HAS BEEN MOVED TO [https://github.com/cloudlibz/nodecloud](https://github.com/cloudlibz/nodecloud)
# NodeCloud
[](https://badge.fury.io/js/nodecloud)
[](https://www.npmjs.com/package/nodecloud)
[](https://www.codacy.com/app/ScoreLab/nodecloud?utm_source=github.com&utm_medium=referral&utm_content=scorelab/nodecloud&utm_campaign=badger)
[](https://travis-ci.org/scorelab/nodecloud)
NodeCloud is a standard library to get a single API among common cloud service providers (Ex. AWS, GCP, Azure.. ).
This will make building products among multiple cloud services and its services easier for the developer.
## Install
```
npm install nodecloud
or
yarn add nodecloud
```
## Service Providers
- Amazon web services (AWS)
- Google cloud platform (GCP)
## Service Types
| Service Category | Service | AWS | GCP |
| --- | --- | --- | --- |
| Compute | IaaS | EC2 | Compute Engine |
| | Containers | ECS | - |
| Storage | Object Storage | S3 | Cloud Storage |
| | Block Storage | EBS | Persistent Disks |
| Networking | Load Balancer | ELB | - |
| | Peering | Direct Connect | - |
| | DNS | Route53 | Google DNS |
| Databases | RDBMS | RDS | - |
| | NoSQL: key-value | DynamoDB | Cloud Datastore |
| | NoSQL: indexed | - | Cloud Datastore |
## Usage
```js
const nodeCloud = require("nodecloud");
// AWS
const ncAWS = nodeCloud.getProvider("AWS");
const options = {
apiVersion: "2016-11-15"
};
const params = {
ImageId: "ami-10fd7020", // amzn-ami-2011.09.1.x86_64-ebs
InstanceType: "t1.micro",
MinCount: 1,
MaxCount: 1
};
const instanceParams = {
Key: "Name",
Value: "Node Cloud demo"
};
const ec2 = ncAWS.compute(options);
ec2
.createInstance(params, instanceParams)
.then(res => {
console.log(`All done ! ${res}`);
})
.catch(err => {
console.log(`Oops something happened ${err}`);
});
```
## Development setup
```
$ git clone https://github.com/scorelab/nodecloud
$ cd nodecloud
$ yarn install
```
### Run unit tests
```
$ yarn test
```