Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anyfs/s3-adapter
AWS S3 adapter for AnyFS
https://github.com/anyfs/s3-adapter
Last synced: about 2 months ago
JSON representation
AWS S3 adapter for AnyFS
- Host: GitHub
- URL: https://github.com/anyfs/s3-adapter
- Owner: anyfs
- License: mit
- Created: 2015-04-15T09:04:35.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-17T11:17:48.000Z (almost 10 years ago)
- Last Synced: 2024-08-08T19:37:46.320Z (6 months ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# anyfs-s3-adapter
[![npm](https://img.shields.io/npm/v/anyfs-s3-adapter.svg?style=flat-square)](https://www.npmjs.com/package/anyfs-s3-adapter)
[![npm](https://img.shields.io/npm/dm/anyfs-s3-adapter.svg?style=flat-square)](https://www.npmjs.com/package/anyfs-s3-adapter)
[![Travis](https://img.shields.io/travis/anyfs/s3-adapter.svg?style=flat-square)](https://travis-ci.org/anyfs/s3-adapter)
![npm](https://img.shields.io/npm/l/anyfs-s3-adapter.svg?style=flat-square)AWS S3 adapter for AnyFS
## Usage
```js
var AnyFS = require('anyfs');
var Adapter = require('anyfs-s3-adapter');
var adapter = new Adapter({
"accessKeyId": "AWS access key",
"secretAccessKey": "AWS secret",
"region": "S3 region",
"bucket": "S3 bucket"
});var fs = new AnyFS(adapter);
fs.list('/dir', function(err, list) {
console.log(list);
});
```## Test
Create `.secret.json` with credentials of your AWS S3 bucket:
```json
{
"accessKeyId": "AWS access key",
"secretAccessKey": "AWS secret",
"region": "S3 region",
"bucket": "S3 bucket"
}
```Then run:
```
npm install
npm test
```## Reference
[S3 API](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#constructor-property)