Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rajikaimal/nodecloud-architecture
POC for NodeCloud with various design patterns - GSoC '17 :sunny:
https://github.com/rajikaimal/nodecloud-architecture
gsoc-2017 javascript nodecloud nodejs
Last synced: 10 days ago
JSON representation
POC for NodeCloud with various design patterns - GSoC '17 :sunny:
- Host: GitHub
- URL: https://github.com/rajikaimal/nodecloud-architecture
- Owner: rajikaimal
- Created: 2017-05-12T03:13:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-10T11:33:13.000Z (over 6 years ago)
- Last Synced: 2024-10-05T17:41:14.860Z (about 1 month ago)
- Topics: gsoc-2017, javascript, nodecloud, nodejs
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nodecloud-architecture
[NodeCloud GSoC Blog](https://medium.com/nodecloud)
POC for NodeCloud using different design patterns
## Install
```
$ git clone https://github.com/rajikaimal/nodecloud-architecture
$ cd nodecloud-architecture
$ yarn install
``````js
const nodeCloud = require('nodecloud');
const config = require('./config');// AWS
const ncAWS = nodeCloud.getProvider('aws');
const awsStorage = ncAWS.storage({ key: config.aws.S3, service: 'S3' });awsStorage.createStorage({ Bucket: 'MyBucket', Body: 'Hello !' })
.then(res => {
console.log(`All done ! ${res}`);
})
.catch(err => {
console.log(`Oops something happened ${err}`);
})// Google cloud platform
const ncGoogle = nodeCloud.getProvider('google');
const googleStorage = ncGoogle.storage({ key: config.google.storage, service: 'Storage' });googleStorage.createStorage({ projectId: 'grape-spaceship-123' })
googleStorage.createStorage({ Bucket: 'MyBucket' })
.then(res => {
console.log(`All done ! ${res}`);
})
.catch(err => {
console.log(`Oops something happened ${err}`);
})
```